JSP tag spanning @include files

Weblogic 5.1 sp 9
          Windows 2000
          inc1.inc:
          <x:customtag>
          inc2.inc:
          </x:customtag>
          body.jsp:
          <%@ include file='inc1.inc' %>
          ...[body stuff here] ...
          <%@ include file='inc2.inc' %>
          hitting this page gives:
          java.lang.RuntimeException: Could not parse embedded JSP code:
          weblogic.utils.ParsingException: Could not complete parsing, unmatched tags:
          customtag
               at weblogic.servlet.jsp.JspLexer.parseJspCode(JspLexer.java:1079)
               at weblogic.servlet.jsp.JspLexer.parseJspCode(JspLexer.java:1057)
               at weblogic.servlet.jsp.JspLexer.parseJspCode(JspLexer.java:1050)
          Why is this not valid? Other JSP engines allow this. Doesn't the @include
          directive just pull in code at .java source generation time?
          Thanks,
          j
          

This does look like a bug. I have tried it too with SP6. Contact support with
          the same problem. [email protected]
          Shiva.
          Jason Collins wrote:
          > Weblogic 5.1 sp 9
          > Windows 2000
          >
          > inc1.inc:
          > <x:customtag>
          >
          > inc2.inc:
          > </x:customtag>
          >
          > body.jsp:
          > <%@ include file='inc1.inc' %>
          > ...[body stuff here] ...
          > <%@ include file='inc2.inc' %>
          >
          > hitting this page gives:
          >
          > java.lang.RuntimeException: Could not parse embedded JSP code:
          > weblogic.utils.ParsingException: Could not complete parsing, unmatched tags:
          > customtag
          > at weblogic.servlet.jsp.JspLexer.parseJspCode(JspLexer.java:1079)
          > at weblogic.servlet.jsp.JspLexer.parseJspCode(JspLexer.java:1057)
          > at weblogic.servlet.jsp.JspLexer.parseJspCode(JspLexer.java:1050)
          > ...
          >
          > Why is this not valid? Other JSP engines allow this. Doesn't the @include
          > directive just pull in code at .java source generation time?
          >
          > Thanks,
          > j
          

Similar Messages

  • Failure in Precompilation of JSPs  due to include file in WL6.1 SP2

    Hi
              We are getting the following error when we try to do precompilation of JSPs using
              precompile param to true in weblogic.xml
              We are deploying our application as war files.
              eagerly waiting for your help
              sincerely
              Ramesh
              Issue description and StackTrace:
              Issue:
              Precompilation of JSPs fail while using precompile param to true in weblogic.xml and deploy it as War file. It is througing "failure pre-compiling JSP's
              weblogic.utils.ParsingException: nested TokenStreamException: antlr.TokenStreamE
              xception: Could not include index.jsp" exception.
              OS: Windows 2000
              Jdk: Sun Jdk1.3.1
              Weblogic: 6.1 SP2
              ***Stacktrace*************
              <Dec 17, 2002 1:05:51 PM CST> <Error> <HTTP> <[WebAppServletContext(3961036,AdvW
              eb,/AdvWeb)] failure pre-compiling JSP's
              weblogic.utils.ParsingException: nested TokenStreamException: antlr.TokenStreamE
              xception: Could not include index.jsp
              at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:1025)
              at weblogic.servlet.jsp.JspParser.doit(JspParser.java:80)
              at weblogic.servlet.jsp.JspParser.parse(JspParser.java:183)
              at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:119)
              at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:255
              

    Ramesh,
              We experienced this sympton as well. In our JSPs, we converted
              <%@ include file="xyz.jsp"%> (static include, source time) to
              <jsp:include page="licensedQuote.jsp"/> (dynamic include, run time)
              and the problem went away.
              We still use static includes at the very start of the JSPs. It seems the problem only occurs when the static include is inside of a tag whose body does JSP evaluation.
              -Charlie
              "Ramesh Danala" <[email protected]> wrote in message news:[email protected]...
              > Hi
              > We are getting the following error when we try to do precompilation of JSPs using
              > precompile param to true in weblogic.xml
              > We are deploying our application as war files.
              > eagerly waiting for your help
              > sincerely
              > Ramesh
              >
              > Issue description and StackTrace:
              > Issue:
              >
              > Precompilation of JSPs fail while using precompile param to true in weblogic.xml and deploy it as War file. It is througing "failure pre-compiling JSP's
              > weblogic.utils.ParsingException: nested TokenStreamException: antlr.TokenStreamE
              > xception: Could not include index.jsp" exception.
              >
              > OS: Windows 2000
              > Jdk: Sun Jdk1.3.1
              > Weblogic: 6.1 SP2
              >
              > ***Stacktrace*************
              >
              > <Dec 17, 2002 1:05:51 PM CST> <Error> <HTTP> <[WebAppServletContext(3961036,AdvW
              > eb,/AdvWeb)] failure pre-compiling JSP's
              > weblogic.utils.ParsingException: nested TokenStreamException: antlr.TokenStreamE
              > xception: Could not include index.jsp
              > at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:1025)
              > at weblogic.servlet.jsp.JspParser.doit(JspParser.java:80)
              > at weblogic.servlet.jsp.JspParser.parse(JspParser.java:183)
              > at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:119)
              > at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:255
              > )
              

  • Jsp taglibs in include files not detected, throws errors, no code insight

    I have a jsp which is included in all the other jsp. it looks something like this
    taglibs.jsp
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
    <%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
    <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
    test.jsp
    <%@ include file="/jsp/menu/taglibs.jsp"%>
    <html>
         <head>
              <title>Tours</title>
         </head>
         <body>
    <form:form commandName="testCommand">
                   <form:hidden path="tour.firstname" id="tour.firstname" />
    and so on.
    I am having 2 problems
    1. the jsp editor show errors all over the place saying
    element path not expected
    element commandName not expected etc.
    2. no code insights.
    but if i include the taglib def in test.jsp it dosn't show any error and also provides code insights. but seldom do people include all taglibs in all jsps.
    is there a way for Jdeveloper to show code insights in jsp pages which includes a jsp or like xml schemas could be added at some place(tools-pref-xml schemas) and when used anywhere, would provide code insights.

    am not sure, try with this
    <jsp:include   .../>

  • Problem with jsp tag in jsf file c:import

    <!-- <c:import url="#{backing_Home.whichMenu}"/>-->
    <jsp:include page="#{backing_Home.whichMenu}"/>
    I am trying to use a JSF variable in jsp tag
    I am getting error like this
    javax.servlet.jsp.JspTagException: /#{backing_Home.whichMenu}     at org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(ImportSupport.java:318)     at org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(ImportSupport.java:186)     at _Home_2e_jsp._jspService(Home.jsp:24) I want to add a page dynamically using that variable
    Is there any other method

    This code works fine for me:
    <%@ taglib uri="/jstl-c" prefix="c" %>
    <html>
         <body>
         <%
              int array[] = new int[] {1,2};
              session.setAttribute("array", array);
              String arrayNames[] = new String[]{"One", "Two"};
              session.setAttribute("arrayNames", arrayNames);
         %>
              <form action="?">
              <select name="select">
                   <c:forEach items='${ sessionScope.array}' var="row">
                        <c:choose>  
                             <c:when test="${param.select== row}"> >
                                  <option value="<c:out value='${row}'/>" selected><c:out value="${sessionScope.arrayNames[row-1]}"/></option>
                             </c:when>   
                             <c:otherwise>
                                  <option value="<c:out value='${row}'/>"><c:out value="${sessionScope.arrayNames[row-1]}"/></option>
                             </c:otherwise>
                        </c:choose>
                   </c:forEach>
              </select>
              <input type="submit" name="submit" value="submit"></input>
              </form>
         </body>
    </html>
    good luck.
    MatrixPooh
    www.bizdisplay.com

  • Jsp ok but IDE display errors in javascript+tags and taglibs include file

    Hi,
    The JDev 10.1.3 IDE display errors on running JSP in following cases:
    1) When tag libs declaration in include file.
    2) When jstl/struts tags are used in javascript
    JDev 10.1.2 didn't diplay those errors
    More details:
    extracts:
    Type of error: Character data not allowed in head
    alert("Your session has been closed automatically after a long period of inactivity.\nOR\nYou used an invalid or old bookmark.");
    javascript comments: (use for debugging)
    // alert("agt: "+agt+", is_ie: "+is_ie);
    Type of error: element <used tag> not expected here
    <fmt:bundle basename="com.photoswing.webview.MainshopAppMessageResources">
    alert("<fmt:message key="alert.timeout.noRedirection"/>");
    </fmt:bundle>
    JDev 10.1.3 has no javascript editor, so it should ignore the content of <script> .. </script>
    Regards
    Fred

    Hi,
    Same message but with formatting tags.
    Closing tag is [ / code ] without blanks.
    Thanks to Didier,
    IDE displayed errors => jsp runs and compiles ok.
    It is not obvious to reproduce those errors because they vary upon external or internal tag declaration.
    Remark:
    I tried replacing jsp tag declaration:
    <%@ include file="../../helper/TagLibsInclude.jsp"%>by simple file but it doesn't help:
    <%@ include file="../../srcInclude/tagLibs.inc"%>Case 1) all tag declaration are external but jstl c and fmt also internal:
    <%@ include file="../../helper/TagLibsInclude.jsp"%>  
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
    <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>Element c:out not expected:
    =====================
    <c:set var="numberOfRows">
      <c:out value="${bindings.LoadedPhotos}" />
    </c:set>Element logic:messagesPresent not expected
    ==================================
         </tr>
        <logic:messagesPresent message="true" >
            <html:messages message="true" id="msg">
             <tr>
              <td colspan="5" class="txtMed txtBold">
                 <c:out value="${msg}"/><br/>
              </td>
             </tr>
            </html:messages>
        </logic:messagesPresent>
        <tr>Element fmt:param not expected .
    ========================
                  <fmt:message key="event.photoCommentInLang.prompt">
                   <fmt:param value="${pageScope.langName1}"/>
                  </fmt:message>
    ..Case 2) all tag declaration are external
    Element set not expected .
    ===================
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <c:set var="sourceId" value="${bindings.EventId.attributeValue}"/>
      <c:set var="sourceId1" value="${bindings.AlbumId.attributeValue}"/>
    ...Element bundle not expected .
    ======================
    </head>
    <body>
    <fmt:bundle basename="com.photoswing.webview.MainshopAppMessageResources">error: Character data not allowed in head
    =============================
    Example:
    <script language="JavaScript" type="text/javascript">
    function FL_init() {
      <c:if test="${not empty requestScope.SessionWasInvalid}">
        alert("<fmt:message key="general.loggedIn.timeout"/>");
        location.href="<c:url value="/accountLogin.do"/>";
      </c:if>
    </script>Regarding my workaround:
    You don't have to remove the tag declaration, but I prefer to keep my jsp as clean as possible.
    But I found another problem, this time it's a serious one, when you reformat the source ALL tag prefixes are removed.
    Example
    <c:set ... becomes <setOther example:
      <c:set var="numberOfRows">
      <c:out value="${bindings.LoadedPhotos}" />
      </c:set>becomes:
        <set var="numberOfRows">
         <out value="${bindings.LoadedPhotos}"/>
        </set>Good luck!
    Fred

  • %@ include file="invoiceFtpPush.xhtml" % in jsp

    Hi All,
    I want to include my xhtml page into my jsp page like :
    <%@ include file="invoiceFtpPush.xhtml" %>I want to know is it possible or not? if not possible then any alternative or if possible then how can i do it?
    Right now it is not working.
    Any idea will be appreciated.
    Thanks and Regards,
    Khushwinder

    Hi Baluc,
    Thanks for your reply. After using <jsp:include../> i m getting the following exception :
    WARN  05-29 18:29:33 Component with id 'organizationForm:senderPanelTab:senderTab:_idJsp314' (org.apache.myfaces.taglib.html.HtmlPanelGridTag tag) and path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /pages/organizationManagement/createOrganization.jsp][Class: javax.faces.component.html.HtmlForm,Id: organizationForm][Class: javax.faces.component.html.HtmlPanelGrid,Id: _idJsp6][Class: org.apache.myfaces.custom.tabbedpane.HtmlPanelTabbedPane,Id: orgPan][Class: org.apache.myfaces.custom.tabbedpane.HtmlPanelTab,Id: senderPanelTab][Class: javax.faces.component.UINamingContainer,Id: senderTab][Class: javax.faces.component.html.HtmlPanelGrid,Id: _idJsp115][Class: javax.faces.component.html.HtmlPanelGrid,Id: _idJsp314]}renders it's children, but has embedded JSP or HTML code. Use the <f:verbatim> tag for nested HTML. For comments use <%/* */%> style JSP comments instead of <!-- --> style HTML comments.
    BodyContent:
    />  (UIComponentBodyTagBase.java:51)
    WARN  05-29 18:29:33 Component with id 'organizationForm:senderPanelTab:senderTab:_idJsp115' (org.apache.myfaces.taglib.html.HtmlPanelGridTag tag) and path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /pages/organizationManagement/createOrganization.jsp][Class: javax.faces.component.html.HtmlForm,Id: organizationForm][Class: javax.faces.component.html.HtmlPanelGrid,Id: _idJsp6][Class: org.apache.myfaces.custom.tabbedpane.HtmlPanelTabbedPane,Id: orgPan][Class: org.apache.myfaces.custom.tabbedpane.HtmlPanelTab,Id: senderPanelTab][Class: javax.faces.component.UINamingContainer,Id: senderTab][Class: javax.faces.component.html.HtmlPanelGrid,Id: _idJsp115]}renders it's children, but has embedded JSP or HTML code. Use the <f:verbatim> tag for nested HTML. For comments use <%/* */%> style JSP comments instead of <!-- --> style HTML comments.
    BodyContent:
    <!-- Search value -->
        <!-- Search value -->  (UIComponentBodyTagBase.java:51)
    ERROR 05-29 18:29:34 Servlet.service() for servlet default threw exception  (ApplicationDispatcher.java:712)
    java.lang.IllegalStateException
         at org.apache.jasper.runtime.ServletResponseWrapperInclude.getOutputStream(ServletResponseWrapperInclude.java:62)
         at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:783)
         at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:348)
         at org.apache.catalina.servlets.DefaultServlet.doPost(DefaultServlet.java:392)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
         at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
         at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
         at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
         at org.apache.jsp.pages.organizationManagement.receiverTab_jsp._jspx_meth_h_panelGrid_9(org.apache.jsp.pages.organizationManagement.receiverTab_jsp:2315)
         at org.apache.jsp.pages.organizationManagement.receiverTab_jsp._jspService(org.apache.jsp.pages.organizationManagement.receiverTab_jsp:373)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
         at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
         at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
         at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
         at org.apache.jsp.pages.organizationManagement.createOrganization_jsp._jspx_meth_f_subview_2(org.apache.jsp.pages.organizationManagement.createOrganization_jsp:729)
         at org.apache.jsp.pages.organizationManagement.createOrganization_jsp._jspx_meth_x_panelTab_2(org.apache.jsp.pages.organizationManagement.createOrganization_jsp:695)
         at org.apache.jsp.pages.organizationManagement.createOrganization_jsp._jspService(org.apache.jsp.pages.organizationManagement.createOrganization_jsp:224)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
         at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)
         Actually previously i was using
    <%@ include file="invoiceFtpPush.jsp" %>which was working fine but now i want to change my invoiceFtpPush.jsp page to xhtml which is giving the above exception.

  • Include jsp tags

    I am having a problem relacing the include file of let's call it a
    header.jsp in a menu page named menu.jsp.
    So in my header.jsp file let's say I do something simple like
    <table>
    <tr><td><jato:href name="first">First Option
    </jato:href></td></tr></table>
    and so on....
    And in my main.jsp I have a simple include at the top of my page
    like so
    <html
    <body>
    <%include file=header.jsp%>
    etc.
    Now when JRun 3.0 makes the include replacement, it seems to have a
    problem where it tells me
    Servlet error 500
    com.iplanet.jato.view href : taglib navigation not found
    BUT when I take out the jato tags in the include file...I can get
    JRun to make the replacement perfectly....
    Does anyone else have this problem and if so how did you get around
    it?

    Sorry to bother you again, but I couldn't find anything that looked strange
    is this file. Can you send us the original file at our personal email
    addresses? I'd like to see exactly where the compilation error occurs and
    it's not possible with the file inlined here.
    todd.fast@e...
    michael.frisino@s...
    Thanks,
    Todd
    ----- Original Message -----
    From: <suket@u...>
    Sent: Wednesday, January 17, 2001 2:02
    Subject: [iPlanet-JATO] Re: include jsp tags
    Hi Mike,
    Both of the jsp files (pgHelp.jsp and pgFooter.jsp)
    are in the same folder. I removed the IPP/ipp portion in the
    include directive but still giving the same err.
    iam using Allair Jrun 3.0.
    Here is the intermediary generated Jsp file
    / Generated by JRun, do not edit
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    import allaire.jrun.jsp.JRunJSPStaticHelpers;
    public class jrun__IPP__ipp__pgHelp2ejsp13 extends
    allaire.jrun.jsp.HttpJSPServlet implements
    allaire.jrun.jsp.JRunJspPage
    private ServletConfig config;
    private ServletContext application;
    private Object page = this;
    private JspFactory __jspFactory = JspFactory.getDefaultFactory();
    public void _jspService(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, java.io.IOException
    if(config == null) {
    config = getServletConfig();
    application = config.getServletContext();
    response.setContentType("text/html; charset=ISO-8859-1");
    PageContext pageContext = __jspFactory.getPageContext(this,
    request, response, null, true, 8192, true);
    JspWriter out = pageContext.getOut();
    HttpSession session = pageContext.getSession();
    try {
    out.print("\r\n\r\n");
    IPP.ipp.pgHelpViewBean viewBean = (IPP.ipp.pgHelpViewBean)
    pageContext.getAttribute("viewBean", PageContext.REQUEST_SCOPE);
    if(viewBean == null) {
    if(JRunJSPStaticHelpers.getAndSetBean(pageContext,
    "viewBean", IPP.ipp.pgHelpViewBean.class
    , PageContext.REQUEST_SCOPE, 3)) {
    viewBean = (IPP.ipp.pgHelpViewBean)pageContext.getAttribute
    ("viewBean", PageContext.REQUEST_SCOPE);
    } else {
    viewBean = (IPP.ipp.pgHelpViewBean)pageContext.getAttribute
    ("viewBean", PageContext.REQUEST_SCOPE);
    pageContext.setAttribute("viewBean",viewBean);
    out.print("\r\n");
    com.iplanet.jato.taglib.UseViewBeanTag useViewBean__4_1 =
    (com.iplanet.jato.taglib.UseViewBeanTag)
    JRunJSPStaticHelpers.createTagHandler(pageContext,
    "com.iplanet.jato.taglib.UseViewBeanTag");
    useViewBean__4_1.setPageContext(pageContext);
    useViewBean__4_1.setParent(null);
    useViewBean__4_1.setClassName("IPP.ipp.pgHelpViewBean");
    int useViewBean__4_1_startVal = useViewBean__4_1.doStartTag();
    JRunJSPStaticHelpers.checkStartVal
    ("com.iplanet.jato.taglib.UseViewBeanTag",useViewBean__4_1_startVal,Bo
    dyTag.EVAL_BODY_INCLUDE,4);
    if(useViewBean__4_1_startVal == BodyTag.EVAL_BODY_INCLUDE) {
    com.iplanet.jato.view.ContainerView currentView =
    (com.iplanet.jato.view.ContainerView)pageContext.getAttribute
    ("currentView");
    com.iplanet.jato.view.TiledView currentTiledView =
    (com.iplanet.jato.view.TiledView)pageContext.getAttribute
    ("currentTiledView");
    out.print("\r\n<HTML>\r\n<HEAD><!--jato:text name=\"stTemp\"
    fireDisplayEvents=\"true\" escape=\"true\" /--><!-- Added Temporarily
    by ravindran on 8th jan 2001 -->\r\n");
    com.iplanet.jato.taglib.TextFieldTag textField__7_1 =
    (com.iplanet.jato.taglib.TextFieldTag)
    JRunJSPStaticHelpers.createTagHandler(pageContext,
    "com.iplanet.jato.taglib.TextFieldTag");
    textField__7_1.setPageContext(pageContext);
    textField__7_1.setParent(useViewBean__4_1);
    textField__7_1.setSize("20");
    textField__7_1.setMaxLength("20");
    textField__7_1.setFireDisplayEvents("true");
    textField__7_1.setName("tbUserID");
    textField__7_1.doStartTag();
    if(textField__7_1.doEndTag() == Tag.SKIP_PAGE) {
    if(true) return;
    out.print("\r\n<TITLE>pgHelp</TITLE>\r\n</HEAD>\r\n<body BGCOLOR=
    \"white\" bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#0000FF\" vlink=
    \"#800080\" alink=\"#FF0000\">\r\n");
    com.iplanet.jato.taglib.FormTag form__11_1 =
    (com.iplanet.jato.taglib.FormTag)JRunJSPStaticHelpers.createTagHandler
    (pageContext, "com.iplanet.jato.taglib.FormTag");
    form__11_1.setPageContext(pageContext);
    form__11_1.setParent(useViewBean__4_1);
    form__11_1.setMethod("post");
    form__11_1.setName("pgHelp");
    int form__11_1_startVal = form__11_1.doStartTag();
    JRunJSPStaticHelpers.checkStartVal
    ("com.iplanet.jato.taglib.FormTag",form__11_1_startVal,BodyTag.EVAL_BO
    DY_INCLUDE,11);
    if(form__11_1_startVal == BodyTag.EVAL_BODY_INCLUDE) {
    out.print("\r\n");
    if(form__11_1.doEndTag() == Tag.SKIP_PAGE) {
    if(true) return;
    out.print("\r\n");
    com.iplanet.jato.taglib.UseContainerViewTag view__1_1 =
    (com.iplanet.jato.taglib.UseContainerViewTag)
    JRunJSPStaticHelpers.createTagHandler(pageContext,
    "com.iplanet.jato.taglib.UseContainerViewTag");
    view__1_1.setPageContext(pageContext);
    view__1_1.setParent(null);
    view__1_1.setName("IPP.ipp.pgFooterViewBean");
    int view__1_1_startVal = view__1_1.doStartTag();
    JRunJSPStaticHelpers.checkStartVal
    ("com.iplanet.jato.taglib.UseContainerViewTag",view__1_1_startVal,Body
    Tag.EVAL_BODY_INCLUDE,1);
    if(view__1_1_startVal == BodyTag.EVAL_BODY_INCLUDE) {
    currentView = (com.iplanet.jato.view.ContainerView)
    pageContext.getAttribute("currentView");
    currentTiledView = (com.iplanet.jato.view.TiledView)
    pageContext.getAttribute("currentTiledView");
    com.iplanet.jato.view.ContainerView
    IPP.ipp.pgFooterViewBean = (com.iplanet.jato.view.ContainerView)
    pageContext.getAttribute("IPP.ipp.pgFooterViewBean");
    out.print("\r\n<hr color=red size=2>\r\nfrom new_footer.jsp in
    IPP/ipp directory\r\n<font size=\"-2\" face=\"Arial\"><i>Send
    comments to <a href=\"mailto:supportdept@a...\">Any
    Company</a></i></font>\r\n<hr color=red size=2>\r\n");
    com.iplanet.jato.taglib.HiddenTag hidden__6_1 =
    (com.iplanet.jato.taglib.HiddenTag)
    JRunJSPStaticHelpers.createTagHandler(pageContext,
    "com.iplanet.jato.taglib.HiddenTag");
    hidden__6_1.setPageContext(pageContext);
    hidden__6_1.setParent(view__1_1);
    hidden__6_1.setFireDisplayEvents("true");
    hidden__6_1.setName("hdFooter");
    hidden__6_1.doStartTag();
    if(hidden__6_1.doEndTag() == Tag.SKIP_PAGE) {
    if(true) return;
    out.print("\r\n");
    if(view__1_1.doEndTag() == Tag.SKIP_PAGE) {
    if(true) return;
    out.print("\r\n");
    out.print("\r\n</BODY> \r\n</HTML>\r\n");
    if(useViewBean__4_1.doEndTag() == Tag.SKIP_PAGE) {
    if(true) return;
    } catch(Throwable t) {
    if(t instanceof ServletException)
    throw (ServletException) t;
    if(t instanceof java.io.IOException)
    throw (java.io.IOException) t;
    if(t instanceof RuntimeException)
    throw (RuntimeException) t;
    throw JRunJSPStaticHelpers.handleException(t,
    pageContext);
    } finally {
    __jspFactory.releasePageContext(pageContext);
    public String getServletInfo()
    return "pgHelp";
    private static final String[] __dependencies__ =
    {"/IPP/ipp/pgHelp.jsp",null};
    private static final long[] __times__ = {979720473658L,0L};
    public String[] __getDependencies()
    return __dependencies__;
    public long[] __getLastModifiedTimes()
    return __times__;
    public int __getTranslationVersion()
    return 14;
    it is generating 2 semicolons automatically..
    near pageContext.getAttribute("IPP.ipp.pgFooterViewBean");
    regards
    ravi
    In [email protected], "Mike Frisino" <Michael.Frisino@S...>
    wrote:
    Hi Suket,
    I just retested something very similar to this in 1.0.
    Essentially, i took an existing page which included a tiledView.
    I moved the TiledView jsp block into an entirely separate jsp file.
    I then replace the TiledView jsp block in the original jsp with aninclude
    <%@ include file="TiledGetOrders.jsp"%>
    It worked like a charm.
    So I am not sure what is wrong in your case.
    Could be a jrun bug?
    I have tested in resin 1.2.1
    To do proper analysis, we would need to see
    1. The intermediary .java file that the jsp engine creates, andthen tries
    to compile.
    C:/Program
    Files/Allaire/JRun/servers/default/ipp/WEB-INF/jsp/jrun__IPP__ipp__pgHelp2ej
    sp.java
    Can you send that to us?
    Incidentally, although we do not think a problem there would causethe
    compile time error you are seeing,
    i am curious about your file value.
    <%@ include file="/IPP/ipp/pgFooter.jsp"%>I did not need to use a qualified file name, although my includetarget file
    was in the same directory as the
    page that was including it. What is the file system relationshipbetween
    your top level page "pgHelp" and the include
    target "pgFooter".
    Are they in same or diff directories?
    ----- Original Message -----
    From: <suket@u...>
    Sent: Tuesday, January 16, 2001 9:42 PM
    Subject: [iPlanet-JATO] Re: include jsp tags
    Hi,
    We tried to follow the steps described by you to have
    dynamic include in a jsp page.
    my jsp file content is
    <%@p... info="pgHelp" language="java"%>
    <%@t... uri="/WEB-INF/jato.tld" prefix="jato"%>
    <jsp:useBean id="viewBean" class="IPP.ipp.pgHelpViewBean"
    scope="request"></jsp:useBean>
    <jato:useViewBean className="IPP.ipp.pgHelpViewBean">
    <HTML>
    <HEAD>
    <jato:textField name="tbUserID" size="20" maxLength="20"
    fireDisplayEvents="true" />
    <TITLE>pgHelp</TITLE>
    </HEAD>
    <body BGCOLOR="white" bgcolor="#FFFFFF" text="#000000"
    link="#0000FF" vlink="#800080" alink="#FF0000">
    <jato:form name="pgHelp" method="post">
    </jato:form>
    <%@ include file="/IPP/ipp/pgFooter.jsp"%>
    </BODY>
    </HTML>
    </jato:useViewBean>
    This is my pgFooter.jsp
    <jato:view name="IPP.ipp.pgFooterViewBean">
    <hr color=red size=2>
    from new_footer.jsp in IPP/ipp directory
    <font size="-2" face="Arial"><i>Send comments to <a
    href="mailto:<a href="/group/SunONE-JATO/post?protectID=061075104115193209050223163176249165134048139046">supportdept@a...</a>">Any Company</a></i></font>
    <hr color=red size=2>
    <jato:hidden name="hdFooter" fireDisplayEvents="true" />
    </jato:view>
    There is no compilation error in pgFooterViewBean and in
    pgHelpViewBean.
    How ever iam getting a runtime error,
    500 Internal Server Error
    /ipp/servlet/IPP.ipp.ippServlet:
    javax.servlet.ServletException: Compilation error occured:
    allaire.jrun.scripting.DefaultCFE:
    Errors reported by compiler:C:/Program
    Files/Allaire/JRun/servers/default/ipp/WEB-
    INF/jsp/jrun__IPP__ipp__pgHelp2ejsp13.java:105:50:105:50: Syntax:
    expected instead of this token
    What could be the reason for this error message?
    We tried the same thing with another approach, instead of using
    include directive, we directly copied the code of pgFooter.jsp in
    pghelp.jsp.
    even that is giving the same error..
    <%@p... info="pgHelp" language="java"%>
    <%@t... uri="/WEB-INF/jato.tld" prefix="jato"%>
    <jsp:useBean id="viewBean" class="IPP.ipp.pgHelpViewBean"
    scope="request"></jsp:useBean>
    <jato:useViewBean className="IPP.ipp.pgHelpViewBean">
    <HTML>
    <HEAD>
    <jato:textField name="tbUserID" size="20" maxLength="20"
    fireDisplayEvents="true" />
    <TITLE>pgHelp</TITLE>
    </HEAD>
    <body BGCOLOR="white" bgcolor="#FFFFFF" text="#000000"
    link="#0000FF" vlink="#800080" alink="#FF0000">
    <jato:form name="pgHelp" method="post">
    </jato:form>
    <jato:view name="IPP.ipp.pgFooterViewBean">
    <hr color=red size=2>
    from new_footer.jsp in IPP/ipp directory
    <font size="-2" face="Arial"><i>Send comments to <a
    href="mailto:<a href="/group/SunONE-JATO/post?protectID=061075104115193209050223163176249165134048139046">supportdept@a...</a>">Any Company</a></i></font>
    <hr color=red size=2>
    <jato:hidden name="hdFooter" fireDisplayEvents="true" />
    </jato:view>
    </BODY>
    </HTML>
    </jato:useViewBean>
    Please give us a feasible solution to solve this problem.
    Thx
    Ravi
    --- In [email protected], "Todd Fast" <Todd.Fast@S...>wrote:
    Craig & Eric--
    (If you're not interested in the resolution to the problem Craigposted,
    please skip ahead to the section in which I describe the
    preferred
    technique
    for including headers and other common content in a JATO page.
    This
    discussion is very important because I introduce the concept of"view
    compostion", in which JATO pages are composed of modular andreusable view
    components. This is one of the most powerful new features of
    JATO,
    and a
    capability that simply wasn't possible in NetDynamics.)
    Posted Problem Resolution
    Craig & Eric, from what I can tell, you are both trying to
    include
    a full
    view bean in a parent page at translation time. This is notpossible, as
    you can see from the compiler errors you get. There are
    collisions
    when
    multiple top-level tags are included in the same JSP.
    When I said earlier that you needed to use a translation-timeinclude
    instead of a run-time include, I was assuming that you were
    trying
    to
    include a fragment of HTML/JSP in the parent page. By
    fragment, I
    mean HTML
    or JSP content that does not declare a view bean or form, but
    rather
    references views contained within the parent view bean. If youwant to
    include a full page (JSP + ViewBean) in another page, then you'dneed to use
    a run-time include. A run-time include temporarily pauses therendering of
    the current page, and sends the full request to the included
    page
    as if it
    were a separate client request. The resulting content from theincluded
    page is inlined into the parent page's content, and processing
    of
    the parent
    page then continues.
    Now I realize after thinking about it a bit that we may not have
    sufficiently provided for full page includes because of some
    late-
    breaking
    changes in the request context handling. After some basic
    testing,
    it
    appears that if you try to include one JATO page in another byreferencing
    the JSP, the included page will cause a class cast exception tooccur.
    There may also be problems because the request context on theincluded page
    will not have been set. In any case, full JATO page inclusionlooks like
    it's an issue we're going to have to address with some fixes
    before
    it will
    work properly. My apologies. (One workaround if this is
    necessary
    is to
    make the included view bean a child view of the parent view
    bean.
    I won't
    go into that however).
    How to Include Common Content
    Now, on to the discussion of the preferred way of including
    common
    content
    in a JATO page. Let's say you have a common header you want toinclude in
    one or more of your JATO pages. Because of the issue I notedabove, and the
    fact that the header is not really independently displayable,
    you
    don't want
    to do a run-time include (which, remember, would necessitateincluding a
    full JATO page).
    Instead, you should include the header as an HTML/JSP fragmentusing a
    translation-time include. Depending on whether your header hasdynamic
    information, you can do one of two things. If the header is
    just
    static
    content and/or set of links, you can just reference the HTMLfragment in the
    parent HTML directly, and you won't need any kind of view or
    view
    bean to
    back it, or any reference to anything in JATO.
    If you need some dynamic info in the header, like the module URLfor a link,
    you can reference the parent page's view bean for this
    information
    by simply
    including references to the parent page's implicit JSP variables(viewBean,
    currentVIew, and currentTiledView). For example:
    Parent JSP:
    <jsp:useBean id="viewBean" class="..."scope="request"></jsp:useBean>
    <jato:useViewBean className="..." fireChildDisplayEvents="true">
    <%@ include file="MyInclude.jsp" %>
    </jato:useViewBean>
    Included content (MyInclude.jsp):
    ... viewBean.getRequestContext().getModuleURL() ...
    The final HTML with the included content would then look like
    this:
    <jsp:useBean id="viewBean" class="..."scope="request"></jsp:useBean>
    <jato:useViewBean className="..." fireChildDisplayEvents="true">
    ... viewBean.getRequestContext().getModuleURL() ...
    </jato:useViewBean>
    MyInclude.jsp will be inlined in the parent JSP before it istranslated to a
    servlet. Note that it does not include the full HTML tags
    normally
    found in
    an HTML file--there are no <html>, <head>, or <body> tags
    because
    it is not
    expected to be used outside of an include page. In effect,
    this is
    the
    equivalent of a server-side include (SSI).
    Now, if you need truly dynamic info in the header, like say youwant to
    display the user's name and SSN, then you'd likely want to
    embed a
    child
    view in the parent view bean which will encapsulate & provide
    the
    necessary
    information. This is in contrast to actually making these
    fields
    direct
    children of the the parent view bean, which would be a tedious
    and
    error
    prone task on every page you wanted to include this information.Let me try
    to contrast these two approaches with a diagram of parent-child
    relationships:
    Here's the bad way:
    ParentViewBean (ViewBean)
    |
    +-- UserFirstName (StaticTextField)
    |
    +-- UserSSN (StaticTextField)
    In this situation, you'd need to provide the logic to populatethese fields
    in every view bean on which they appeared. This is tedious andessentially
    eliminates the "common"-ness of the content (this is also whatNetDynamics
    forced people to do).
    Now, the better way:
    ParentViewBean (ViewBean)
    |
    +-- MyHeaderView (MyHeaderView.java)
    |
    +-- UserFirstName (StaticTextField)
    |
    +-- UserSSN (StaticTextField)
    In the better way, you can see that the header information isencapsulated
    in an instance of "MyHeaderView", which is a subclass ofContainerViewBase
    or one of the other ContainerView subtypes. The population of
    the
    data
    fields is encapsulated in that view, and the parent view need
    not
    know
    anything about what's actually being displayed by that view.
    Thus, you can see that MyHeaderView, in conjunction with a
    snippet
    of JSP
    content in a companion file, is completely modular and can beembedded in
    any parent view bean on which you want the header to appear.
    The
    only
    requirement is then to include MyHeaderView as a child view of
    the
    parent
    view bean, and to include the correct JSP content that
    references
    that child
    view.
    The included JSP content would now look something like this:
    <jato:view name="MyHeaderView">
    <table>
    <tr><td>... <jato:staticText name="UserFirstName"/>
    ...</td></tr>
    <tr><td>... <jato:staticText name="UserSSN"/> ...</td></tr>
    </table>
    </jato:view>
    If we now included this content in the parent JSP from furtherabove, we get
    the following as the JSP content before it is translated into aservlet:
    <jsp:useBean id="viewBean" class="..."scope="request"></jsp:useBean>
    <jato:useViewBean className="..." fireChildDisplayEvents="true">
    <jato:view name="MyHeaderView">
    <table>
    <tr><td>... <jato:staticText name="UserFirstName"/>
    ...</td></tr>
    <tr><td>... <jato:staticText name="UserSSN"/> ...</td></tr>
    </table>
    </jato:view>
    </jato:useViewBean>
    Ultimately, this technique is called "view compostion" or "view
    aggregation", and is one of the major new features of JATO. Youcan now
    define reusable view components and embed them in multiple viewcontainers,
    on the same page or on different pages. Each page acts as a
    frame,
    in which
    you provide the contents from modular components. Using thistechnique, you
    can develop reusable view classes and chunks of JSP that can bearbitrarily
    combined into complex pages.
    I know this is a long and rambling discussion, but I hope I've
    made
    myself
    at least partly clear. I'm more than happy to clarify anything
    or
    elaborate
    more. Please let me know.
    Todd
    Todd Fast
    Senior Engineer
    Sun/Netscape Alliance
    todd.fast@e...
    [email protected]
    [email protected]

  • Included files in JSPC

    Using WL5.1, JSPC can't seem to find files included in a JSP, such as:
              <%@ include file="include/include_file.inc" %>
              The docroot is set to the directory containing the JSP files, and the
              include directory (which contains all included files) is directly under the
              docroot directory.
              In the generated java file we get:
              // cannot include file 'include/include_file.inc' //[ /BrandEdit.jsp; Line:
              33]
              //[ /BrandEdit.jsp; Line: 34]
              out.println("<!-- cannot include file 'include/include_file.inc', resource
              not found -->"); //[ /BrandEdit.jsp; Line: 33]
              //[ /BrandEdit.jsp; Line: 34]
              Any ideas on why the included files aren't being found by JSPC?
              Thanks,
              Steve
              

    Fixed in SP9 - available very soon.
              ISSUE 38661
              Compiling a JSP that contains an include directive with a relative URI was
              not resulting in the file's path being parsed correctly.
              Mike
              "Steve Crook" <[email protected]> wrote in message
              news:3ac97e4d$[email protected]..
              > Using WL5.1, JSPC can't seem to find files included in a JSP, such as:
              > <%@ include file="include/include_file.inc" %>
              >
              > The docroot is set to the directory containing the JSP files, and the
              > include directory (which contains all included files) is directly under
              the
              > docroot directory.
              >
              > In the generated java file we get:
              > // cannot include file 'include/include_file.inc'
              ile://[ /BrandEdit.jsp; Line:
              > 33]
              > file://[ /BrandEdit.jsp; Line: 34]
              > out.println("<!-- cannot include file 'include/include_file.inc', resource
              > not found -->"); file://[ /BrandEdit.jsp; Line: 33]
              > file://[ /BrandEdit.jsp; Line: 34]
              >
              > Any ideas on why the included files aren't being found by JSPC?
              >
              > Thanks,
              > Steve
              >
              >
              

  • Repost: relative URL in @ include file , parsing Exception

              Repost : hope this formats properly.
              Hello all
              I've a jsp file that includes another like
              < % @ include file="../common/check_active_user.jsp" % >
              It works fine on WL5.1 and on WL6.0sp1 as long as I don't
              packageit in .war file.
              With the .war file I get the attached
              Weblogic.utils.ParsingExceptionexception.
              Is this a bug in WL6.0sp1? has anybody else encountered
              similar problem?
              TIA
              [parse.txt]
              

    Ashish,
              We include all our jsp's using
              <%@ include file="/common/check_active_user.jsp" %>
              This works fine without any problem in open directory deployment and also when
              we deploy as war file.
              I checked the case you mentioned (changing /common to ../common) its fails for
              me too when I made war file.
              Thanks,
              Kumar.
              ashish gupta wrote:
              > Repost : hope this formats properly.
              >
              > Hello all
              > I've a jsp file that includes another like
              > < % @ include file="../common/check_active_user.jsp" % >
              > It works fine on WL5.1 and on WL6.0sp1 as long as I don't
              > packageit in .war file.
              > With the .war file I get the attached
              > Weblogic.utils.ParsingExceptionexception.
              > Is this a bug in WL6.0sp1? has anybody else encountered
              > similar problem?
              >
              > TIA
              >
              > ------------------------------------------------------------------------
              > Name: parse.txt
              > parse.txt Type: Plain Text (text/plain)
              > Encoding: base64
              

  • Relative URL in @ include file , parsing Exception

              Hello all
              I've a jsp file that includes another like
              <%@ include file="../common/common.jsp" %>
              It works fine on WL5.1 and on WL6.0sp1 as long as I don't package
              it in .war file. With the .war file I get the attached weblogic.utils.ParsingException
              exception.
              Is this a bug in WL6.0sp1? has anybody else encountered similar
              problem?
              TIA
              [parse.txt]
              

    Ashish,
              We include all our jsp's using
              <%@ include file="/common/check_active_user.jsp" %>
              This works fine without any problem in open directory deployment and also when
              we deploy as war file.
              I checked the case you mentioned (changing /common to ../common) its fails for
              me too when I made war file.
              Thanks,
              Kumar.
              ashish gupta wrote:
              > Repost : hope this formats properly.
              >
              > Hello all
              > I've a jsp file that includes another like
              > < % @ include file="../common/check_active_user.jsp" % >
              > It works fine on WL5.1 and on WL6.0sp1 as long as I don't
              > packageit in .war file.
              > With the .war file I get the attached
              > Weblogic.utils.ParsingExceptionexception.
              > Is this a bug in WL6.0sp1? has anybody else encountered
              > similar problem?
              >
              > TIA
              >
              > ------------------------------------------------------------------------
              > Name: parse.txt
              > parse.txt Type: Plain Text (text/plain)
              > Encoding: base64
              

  • JSP Tag -- Including a JSP fragment in a Java Tag file

    Hi all,
    I have a query regarding JSP Tag file authoring by extending the TagSupport class. I would like to know if it is possible to include a JSP file fragment inside a Java file somehow.
    Specifically, I have created a simple template tag, which adds a header and footer template to the resulting HTML page.
    <bc:template>
    Hello World!
    </bc:template>produces for example
    <html><body>
    Hello World!
    </body></html>Now I have two JSP fragment files (head.jspf and foot.jspf), and I want to do do something like
    public class HtmlTemplateTag extends TagSupport implements TryCatchFinally {
      public int doStartTag() {
        // somehow include head.jspf
        return EVAL_BODY_INCLUDE;
      public void doFinally() {
        // somehow include foot.jspf
    }Which means, I want to execute had.jspf and foot.jspf from the Java class file. I am not sure if it is even possible. If anyone can help me with this, it would be greatly appreciated.
    thanks
    nilesh

    Your intention is to put a header/footer on pages in your web application?
    There is another way to do it - specify prelude/coda jsp fragments in web.xml
    Something like the following:
    <jsp-config>
      <jsp-property-group>
        <url-pattern>*.jsp</url-pattern>
        <include-prelude>/WEB-INF/jspf/head.jspf</include-prelude>
        <include-coda>/WEB-INF/jspf/foot.jspf</include-coda>
      </jsp-property-group>
    <jsp-config>

  • How to include a file as variable in %@ include file tag.

    Hi,
    I have a interesting problem here, how can I include a file in <%@ include file tag. where the include file path is a variable. I am trying to implement the following statement.
    <@ include file="<%=headerLogic_template %>">
    where headeLogic_template is a variable which contains the actual path of the include file.
    Thanx,
    Ramana.
    email:[email protected]

    Please note that you can not write anything else between the quotes nor for page specification or parameters.
    BAD EXAMPLE!!
    <% for (int i = 0; i < 20; i++) { %>
    <jsp:include page="included.jsp" flush="false">
      <jsp:param name="apa" value="prestring_<%=i%>"/>
    </jsp:include>
    <% }BAD EXAMPLE!!

  • Custom tag in included JSP page cause exception (WLS 5.1 SP 9)

              An application use custom tags (JSP Tag extensions) in JSP page
              included into another JSP page by means <jsp:include> instruction.
              After we had installed Service Pack 9 for Weblogic 5.1
              browser's call of including JSP began show an error.
              When I remove Weblogic510sp9.jar and Weblogic510sp9boot.jar
              references from startWebLogic.cmd, the error diagnostic disappear.
              Is Service Pack Number 9 wrong?
              ==========================
              Web browser diagnostic:
              Error 500--Internal Server Error
              From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
              10.5.1 500 Internal Server Error
              The server encountered an unexpected condition which prevented it from fulfilling
              the request.
              ==========================
              Console diagnostic:
              Tue Jun 05 17:40:14 MSD 2001:<I> <WebAppServletContext-dscat> looking for taglib
              uri /exttags.tld as resource /WEB-INF/e
              xttags.tld in Web Application root:
              Tue Jun 05 17:40:15 MSD 2001:<I> <WebAppServletContext-dscat> Generated java file:
              C:\weblogic\dscat\WEB-INF\_tmp_war_ds
              cat\jsp_servlet\_jsp\_opos\_catalog.java
              Tue Jun 05 17:40:25 MSD 2001:<E> <WebAppServletContext-dscat> Servlet failed with
              Exception
              java.lang.VerifyError: (class: jsp_servlet/_jsp/_opos/_catalog, method: _jspService
              signature: (Ljavax/servlet/http/Http
              ServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) Register 12 contains
              wrong type
              at java.lang.Class.newInstance0(Native Method)
              at java.lang.Class.newInstance(Unknown Source)
              at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:469)
              at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java,
              Compiled Code)
              at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:442)
              at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:228)
              at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:200)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:115)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:138)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:915)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:879)
              at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:269)
              at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:365)
              at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
              ==========================
              Including JSP file:
              <%@ include file="catalog_real.jsp" %>
              ==========================
              Included JSP file:
              <%@ taglib uri="/exttags.tld" prefix="dscat" %>
              <dscat:pageheader>Catalog header</dscat:pageheader>
              ==========================
              Tag extansions library (WEB-INF/exttags.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>dscat</shortname>
              <tag>
              <name>pageheader</name>
              <tagclass>ru.ibs.xbcat.view.tag.PageHeader</tagclass>
              </tag>
              </taglib>
              ==========================
              Class PageHeader:
              package ru.ibs.xbcat.view.tag;
              import java.io.*;
              import javax.servlet.jsp.*;
              import javax.servlet.jsp.tagext.*;
              public class PageHeader extends BodyTagSupport {
              public int doStartTag() throws javax.servlet.jsp.JspException {
              return BodyTag.EVAL_BODY_TAG;
              public int doAfterBody() throws javax.servlet.jsp.JspException {
              return(SKIP_BODY);
              

              Are you using Jikes? See if this helps ...
              http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.jsp&item=6287&utag=
              Mike
              "Radik Usmanov" <[email protected]> wrote:
              >
              >An application use custom tags (JSP Tag extensions) in JSP page
              >included into another JSP page by means <jsp:include> instruction.
              >
              >After we had installed Service Pack 9 for Weblogic 5.1
              >browser's call of including JSP began show an error.
              >When I remove Weblogic510sp9.jar and Weblogic510sp9boot.jar
              >references from startWebLogic.cmd, the error diagnostic disappear.
              >
              >Is Service Pack Number 9 wrong?
              >==========================
              >Web browser diagnostic:
              >
              >Error 500--Internal Server Error
              >From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
              >10.5.1 500 Internal Server Error
              >The server encountered an unexpected condition which prevented it from
              >fulfilling
              >the request.
              >
              >==========================
              >Console diagnostic:
              >
              >Tue Jun 05 17:40:14 MSD 2001:<I> <WebAppServletContext-dscat> looking
              >for taglib
              >uri /exttags.tld as resource /WEB-INF/e
              >xttags.tld in Web Application root:
              >Tue Jun 05 17:40:15 MSD 2001:<I> <WebAppServletContext-dscat> Generated
              >java file:
              >C:\weblogic\dscat\WEB-INF\_tmp_war_ds
              >cat\jsp_servlet\_jsp\_opos\_catalog.java
              >Tue Jun 05 17:40:25 MSD 2001:<E> <WebAppServletContext-dscat> Servlet
              >failed with
              >Exception
              >java.lang.VerifyError: (class: jsp_servlet/_jsp/_opos/_catalog, method:
              >_jspService
              >signature: (Ljavax/servlet/http/Http
              >ServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) Register 12
              >contains
              >wrong type
              > at java.lang.Class.newInstance0(Native Method)
              > at java.lang.Class.newInstance(Unknown Source)
              > at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:469)
              > at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java,
              >Compiled Code)
              > at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:442)
              > at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:228)
              > at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:200)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:115)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:138)
              > at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:915)
              > at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:879)
              > at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:269)
              > at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:365)
              > at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
              >Code)
              >
              >==========================
              >Including JSP file:
              >...
              > <%@ include file="catalog_real.jsp" %>
              >...
              >
              >==========================
              >Included JSP file:
              >...
              > <%@ taglib uri="/exttags.tld" prefix="dscat" %>
              >...
              ><dscat:pageheader>Catalog header</dscat:pageheader>
              >...
              >==========================
              >Tag extansions library (WEB-INF/exttags.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>dscat</shortname>
              >
              > <tag>
              > <name>pageheader</name>
              > <tagclass>ru.ibs.xbcat.view.tag.PageHeader</tagclass>
              > </tag>
              >
              ></taglib>
              >==========================
              >Class PageHeader:
              >
              >package ru.ibs.xbcat.view.tag;
              >
              >import java.io.*;
              >import javax.servlet.jsp.*;
              >import javax.servlet.jsp.tagext.*;
              >
              >public class PageHeader extends BodyTagSupport {
              >
              > public int doStartTag() throws javax.servlet.jsp.JspException {
              > return BodyTag.EVAL_BODY_TAG;
              > }
              >
              > public int doAfterBody() throws javax.servlet.jsp.JspException {
              > ...
              > return(SKIP_BODY);
              > }
              >}
              >
              

  • Dynamic include file in JSP page

    <span class="value">Hi
    i have index.jsp , this page can include jsp
    pages dynamically by passing the name of the page to be included to the
    index page with out .jsp , so if i want to include page "code.jsp" i
    put: .../index.jsp?page=code , this have to include code.jsp page
    i made the following code , but it did not find the file
    so can any one help plz ?
            String pg=request.getParameter("page");
            if( pg!= null && ! "".equals(pg)){
                    File f=new File(request.getParameter("page")+".jsp");
                    if(f.exists()){
                            out.print("file exist");
                            %>
                            <jsp:include page="<%=request.getParameter("page")+".jsp" %>" />
            <%
                    }else{
                            out.print("file not exist");
         

    What does the file existing or not really have to do with it?
    You can try it like this:
    String pg=request.getParameter("page");
            if( pg!= null && ! "".equals(pg)){
                    String webPath = pg + " .jsp";
                    String realPath = request.getRealPath(webPath);
                    File f=new File(realPath);
                    if(f.exists()){
                            out.print("file exist");
                            %>
                            <jsp:include page="<%= webPath %>" />
            <%
                    }else{
                            out.print("file not exist");
            }Alternatively you could try using a request dispatcher:
    RequestDispatcher rd = request.getRequestDispatcher(webPath);
    if (rd == null){
      // doesn't exist
    }

  • Weblogic 9.1/10 not working on jsp:directive.include file="file.jspf"/

    Does anyone know how to get rid of this problem? I have a jsp page including a sun java studio creator created page fragment using the tag:
    <jsp:directive.include file="myHeader.jspf"/>
    here myHeader.jspf is a page fragment.
    after deployment, weblogic server report error as:
    weblogic.servlet.jsp.CompilationException: Failed to compile JSP /Page1.jsp
    Page1.jsp:15:57: Error in "C:\bea\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\proj\grb4mk\war\myHeader.jspf" at line 1: The encoding "null" specified in the XML prolog is unsupported.
    <jsp:directive.include file="myHeader.jspf"/>
    ^----------------^
    Any idea? I tried both weblogic 9 and 10, same error, change to
    <jsp:include page="myHeader.jspf"/>
    works. the question is: why not read jsp 1.2 tag? Any way to make it work with jsp:directive.include tag?
    thanks in advance.
    Edited by: user10243594 on Sep 10, 2008 10:22 AM

    The "jsp:directive.include" tag is only valid in an well-formed XML file that specifies all the relevant namespaces. The "jsp:include" tag is used in a JSP file. I'll bet the beginning of your file shows that you don't have a valid and well-formed XML file.
    If you found that "jsp:include" worked, then that confirms you have an ordinary JSP file here. Why are you trying to use the XML form? The result of "jsp:include" in a JSP file will be exactly the same as the analogous tag in an XML file.

Maybe you are looking for

  • Best practice for viewing short home videos on AppleTV?

    Please help me find a simple way to view short home videos taken on a digital video camera, photo camera or cell phone on my Apple TV. I've been using AppleTV to showcase my photos for a couple months now, but all the short little videos I take along

  • I just burned a dvd but it wont work in my dvd player

    i burned a dvd last night using toast and i tried playing it in my dvd player and it wouldnt play the movie. can somebody tell me the steps in which they burn a dvd using toast.

  • Make DW use JS code-coloring instead of PHP

    I have a Javascript file that has a .php extension because of some dynamic elements on the page. I also can't wrap the code in <script> tags because of the way it loads. So basically, I need to tell DW to use JS code coloring on this page instead of

  • My pods internet wont work when it's connected

    My ipod shows the 3 wifi bars at the top but when I try an do anything to do with the internet it is not connected to the internet. i have tried everything like turning the wifi on and off, unplugging the router and plugging it back in again, resetti

  • Problem in installing itune 10.5.2.11 on window vista PC

    I have downloaded itune 10.5.2 .11but could not complete installation on my window Vista PC, telling me that it can not be completed because a programme needed can not be run and to check for solution by contacting installation package vender. I then