Body include

Hey there,
Maybe someone knows already, i want to take out the whole
body section of an html page and place it in another file
How do i include this in the original page? Anyone?
Thanks for any help.
Roderick.

Why?
How about -
<body>
<!--#include file="yourbody.html" -->
</body>
Make sure you name this file with the *.shtml extension when
you save it.
Frankly, it sounds like the idea needs a bit of refinement,
though. I don't
see a big advantage to this.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"belgen" <[email protected]> wrote in
message
news:es465v$1n3$[email protected]..
> Hey there,
>
> Maybe someone knows already, i want to take out the
whole body section of
> an
> html page and place it in another file
> How do i include this in the original page? Anyone?
>
> Thanks for any help.
>
> Roderick.
>

Similar Messages

  • Included JSP files not seeing JavaScript in main JSP file

    Hi All,
    I have a JSP page that defines a JavaScript block in it's HEAD block and then includes multiple JSP pages in it's BODY block. Calling a JavaScript function from any of the included JSP pages is met with the following JavaScript error:
    JavaScript Error: [unknown origin]:
    showBatchDetail is not defined.
    I'm not sure what is wrong here since the JSP is generating on the server side and everything is fine by the time it gets to the client side. The entire client side file should be seeing the JavaScript block that was included in the main file.
    Any help here would be much appreciated.
    Steph.
    Some barebones code appears below:
    Main.jsp
    <HTML>
    <HEAD>
    <TITLE>UNIT INFO</TITLE>
    <SCRIPT LANGUAGE="JavaScript">
    function showBatchDetail(batchKey)
    var url = "/pditools/html/SfmReports/ShowBatchDetail.jsp"
    + "?batchKey=" + batchKey;
    document.location = url;
    </SCRIPT>
    </HEAD>
    <BODY>
    <%@include file="ShowBatchSummary.jsp"%>
    <%@include file="ShowUnitDefects.jsp"%>
    <%@include file="ShowUnitHistory.jsp"%>
    </BODY>
    </HTML>
    ShowBatchSummary.jsp
    <TABLE>
    <TR>
    <TD>
    BATCH SUMMARY
    <A TARGET="_blank" HREF="JavaScript:showBatchDetail(1000);">(Batch Detail)</A>
    </TD>
    </TR>
    <TR>
    Show some data ...
    </TR>
    </TABLE>

    The problem is not about include but about link use
    ----ShowBatchSummary.jsp----
    <TABLE>
    <TR>
    <TD>
    BATCH SUMMARY
    <A TARGET="_blank" HREF="#" onclick="JavaScript:showBatchDetail(1000);">(Batch Detail)</A>
    </TD>
    </TR>
    <TR>
    Show some data ...
    </TR>
    </TABLE>
    -------end of ShowBatchSummary.jsp--------

  • EWS 1.2, Exchange 2010 SP2/SP3 - Appointment message body gets wrecked on update

    We're seeing a very irritating issue with EWS and Exchange when updating the message body on an Appointment. To head it off, it does not appear to be the bug detailed here:
    http://blogs.msdn.com/b/dhruvkh/archive/2012/05/18/sending-appointments-from-ews-apps-where-did-my-html-go.aspx
    It happens on both 2010 SP2 and SP3. We're creating Appointments with some HTML formatting the message body. Nothing fancy, just a few tables and a little bit of inline styling (since a css style header disappears into a black hole when you try to use it
    as part of the Appointment message body). We're able to make a nice-looking message body that goes out in the meeting requests. Well, with the exception of downlevel text at the top, but there doesn't seem to be much we can do about that short of a double-tap
    save.
    The problem comes into play if we need to update the message body on the Appointment. All of this is automated, so the user cannot directly edit it. If we make any changes to the message body, it completely wrecks the HTML. It's still an HTML-formatted message,
    but much of the styling is lost and it looks awful. This happens without fail when we alter the message body of an Appointment with any considerable level of HTML formatting. BodyType is HTML, of course. I've done some digging on the best body algorithm and
    some of the MAPI properties related to it. Some interesting bits of note:
    When the Appointment is first saved, PidTagRtfInSync is true. PidTagNativeBody is 2, which indicates an RTF message. PidTagBody is present. PidTagRtfCompressed is present. However, PidTagBodyHtml is not present. After updating the Appointment with a message
    body edit, PidTagBodyHtml is present, but now PidTagRtfInSync is false and PidTagNativeBody is 3.
    If PidTagBodyHtml is set directly as an extended property instead of setting the message body via the EWS Appointment object, then the formatting is wrecked right out of the gate. At least it's consistent that way...
    Attempting to set PidTagNativeBody manually had no effect.
    When viewing the PR_BODY_HTML contents between a good and bad message, the good one will contain the transformed HTML. It doesn't look much like what we had initially handed to it, but gets changed in the conversion process. The bad one is much closer to
    what we wrote in actual HTML, but has still had much of the styling removed. It's as if creating the Appointment does the RTF conversion, but any subsequent changes use a completely different code path serverside and there does not appear to be any way around
    it short of even more guess and check with EWS and Exchange chewing up HTML. This is complicated by being unable to find any documentation that details how and what gets changed, discarded, etc in the process.
    This will always affect requests, but only seems to affect Appointments in the calendar of attendees if the body includes the downlevel text. Appointments without the downlevel text appear to survive updates with their formatting intact. Appointments with
    downlevel text get their formatting wrecked with updates.
    Has anyone run into this before? It was painful enough when we found that our previously-used email HTML formatter wouldn't work with EWS and everything had to be inlined, but now it seems that there are even more inexplicable problems to get around. Is
    there a way to update the message body without this happening?

    Ugh... hopefully I can ask you gentleman how to solve my issue.
    I recently implemented code to allow our users to turn-on HTML-encoding for when our Sync'ing app goes to add/update items for them into Exchange.
    If thev'ye turned-on HTML formatting, when I create a CalendarItemType's (in C# based off the EWSProxies.EWS.Itemtype) the Body.Value is being set with a string which contains very minimal HTML tags... just <br>'s instead of "\r\n" and for
    URL link values we are embedding into the text, I'm encapsulating those within an <a href> 
    Example: <a href="http://TheWebSite.com/EventDisplay.aspx?uri=1234">Event Display Link</a>
    My problem is... when I retrieve an item from Exchange... there is a huge amount of extra HTML encoding it wraps around everything! 
    By inspecting in the debugger... I've discerned that :
    For Appts... the main bunch of text that I inserted in an item when originally creating it is contained just within the <div> tag.
    For Tasks... the main bunch of text that I inserted in an item when originally creating it is contained just within the <body> tag (and on these there is no <div> tag created).
    I was able to use the HTML Agility Pack and load this Body.Value string into the enhanced HtmlDocument object.  I first attempt to parse first for the <div> nodes contents. If the <div> is not-null that's an Appt.  If the <div>
    is null, I instead parse out the <body> nodes contents, and those are Tasks.
    I noticed for Appts :
    For every <br> tag I had in my original text.. it appends two consecutive "\r\n" 's after it!  No problem I can just do a Replace("\r\n", "")  and zap those. But then the <a href> I have in there... it
    encapsulates it with a <font> node where it sets a color for the link and also an underline <u> node.  I can handle the <u> nodes easy enough with a Replace("<u>","") and a Replace("</u>", ""); 
    But what about the damn <font> node?  It's in the format of <font color=\"blue\"></font> and I'm sure the \"blue"\ part could be different for every user.
    I noticed for Tasks :
    It prepends a "\r\n" just inside the begininng<body> tag. Each of the original <br> tags gets an "\r\n" appended behind it.  and for the TaskType for the <a href> node IT DOES NOT encapsulate it with the <font>
    and <u> nodes as it does for the Appt.
    How can I stop it from changing the Body content when retrieving it?  Will it not change anything if I go the extra mile and make sure to wrap everything with an <html> and <body> node when initially creating the items?
    Any and all help on this issue is sorely appreciated.
    Thank You,
    -G

  • How do I include pages conditionally

    I have three incolude files in the mail JSP file. It's given one after another without any condition. How do I include them 'conditionally' -- include the one, which some validation fails. For example, if only shipping address validation fails, it should have only val_ship_addr.jsp included, not others.

    i just wanna see clearly your situation.. what exactly you want to achieve? r u trying to have an error message on screen or something else? can u elaborate further ?
    anyways, i have a simple example on how to include conditionally just to give u an idea..this might help you <i hope>:
    so i hav a main screen named main.jsp .... on the left part of the screen list two links that corresponds to various screen . in short the right part of the screen is dynamic, depending on what the user clicks on the left part of screen.
    suppose i have two menu's on the left screen named : My Profile and Change Password
    /**** here is the main.jsp ********/
    <html>
    <head>
    <script language="javascript">
    function toggleScr(formobj){
    document.formobj.submit();
    </script>
    </head>
    <body>
    <%@ include file="misc.html" %>
    <table width="100%">
    <tr>
    <td width="200px">
    <!-- left panel -->
    <%@ include file="LeftPanel.jsp"%>
    </td>
    <td width="350px">
    <!-- main screen this is the dynamic part -->          
    <%
    if(request.getParameter("scr")!=null){
    String screentype=request.getParameter("scr")
    if(screentype.equalsIgnireCase("B")){
    %>
    <%@ include file="Myprofile.jsp"%>
    <%
    }else{
    %>
    <%@ include file="NewPassword.jsp"%>
    <%
    }else{
    // show the default screen
    %>
    </td>
    </tr>
    </table>
    </body>
    </html>
    /*** here is the LeftPanel.jsp ***/
    <table>
    <tr>
    <td>
    My Profile
    </td>
    </tr>
    <tr>
    <td>
    New Password
    </td>
    </tr></table>
    /*** here is the misc.html ****/
    <FORM NAME="myfprofileform" method="post" action="main.jsp">
    <INPUT TYPE="HIDDEN" NAME="scr" VALUE="A"/>
    </FORM>
    <FORM NAME="newpwdform" method="post" action="main.jsp">
    <INPUT TYPE="HIDDEN" NAME="scr" VALUE="B"/>
    </FORM>

  • Save pkg spec and body

    LO,
    When using the "save package spec and body", a single file (pls extension) is generated with package spec and package body, including '/' characters, which is what is expected.
    The trouble is that if you open this file back with SQL developer, a PL/SQL editor is opened with both spec and body. This prevents the compilation, since either spec or body is expected, not both.
    Suggestion #1: open two PL/SQL windows, one for spec and the other for body
    Suggestion #2: do not open PL/SQL editor, but rather SQL Worksheet for pls files
    I do not indicate a version since it happens in every version.
    Thanks to correct,
    Olivier.

    Added default file filter *.sql -- the choice between PL/SQL editor and SQL Worksheet is based upon file extension. Expect fix in 3.1.1

  • INCLUDE (Any one know how to do it ???)

    I got one situation ..
    My one JSP (say example1.jsp) is on server1
    & another jsp(say example2.jsp) is on server 2
    I want to include output of example1.jsp (server1) into example2.jsp ...
    I try to use include but it allows only relativeURI ...
    Any one know how to do it ???

    <body>
    <%@ include file = "example2.jsp" %>
    </body>
    is that what you are looking for?That won't work; he explicitly stated that the second jsp is on a different server, and you can't use either include directive across servers.
    The only option is to open a connection to the other server/jsp and effectively "pipe" the results into your current JSP.// assume this a scriptlet in jsp1.jsp
    java.net.URL url = new java.net.URL("http://server2/jsp2.jsp");
    java.io.BufferedReader reader=
        new java.io.BufferedReader(new java.io.InputStreamReader(url.openStream()));
    String inputLine = null;
    while ((inputLine = reader.readLine()) != null) {
        out.println(inputLine);
    reader.close();Of course, you could always write a custom tag that includes this logic if you are going to have to do this very often...

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

  • Jsp:include strange behaviour

    Hi All
    I have a file called bottom.jsp and I want to include this file in all other jsp files in my site. This works fine for the pages that are in the same dir as bottom.jsp but for other pages that have not the same dir as bottom.jsp the links in the bottom.jsp do not refer to their correct destinations anymore.
    All helps appreciated.

    Hi,
    try changing the link in the header.html which points to target.jsp and make it relative to your application root..... then you can use it in any directory...
    header.html in D:\Tests\Web\HeaderTest
    <div align="center">Link</div>
    Hope this works :-)
    Hi Again
    But it seems that your suggestion is not working (or
    maybe something's wrong again with me). My Directory
    structure is:
    D:\Tests
    ���\Web
    ������\HeaderTest
    ���������\
    EB-INF
    ���������\
    ub
    and I have defined a Context in Tomcat like this:
    <Context
         path="/headertest"
         docBase="D:\Tests\Web\HeaderTest"
         debug="0"
         privileged="true"
    />
    and my files are:
    header.html in D:\Tests\Web\HeaderTest
    <div align="center"><a
    href="target.jsp">Link</a></div>
    target.jsp in D:\Tests\Web\HeaderTest
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt
    ">
    <%@ page contentType="text/html; charset=utf-8"
    language="java" import="java.sql.*" errorPage="" %>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    </head>
    <body>
         Sample Page
    </body>
    </html>
    index.jsp in D:\Tests\Web\HeaderTest\sub
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt
    ">
    <%@ page contentType="text/html; charset=utf-8"
    language="java" import="java.sql.*" errorPage="" %>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    </head>
    <body>
         <%@include file="/header.html" %>
    </body>
    </html>
    I have also tried the jsp:include action but again I
    can't get it working. When I include the header.html
    file, I want the link to refer to the
    http://localhost:8080/headertest/target.jsp but I
    don't know why it refers to
    http://localhost:8080/target.jsp which is not
    available.
    Any ideas?
    Lots of thanks again.

  • ReportSDKPrinterException: Printer name could not be set

    I am working on testing a web application with BOE XI V 3.1.  I have the database and RAS machines setup.  I have been working on changing my app to printing through the RAS.  I have print preview and export working, but am running into issues printing to a printer.
    On the RAS which is on a virtual machine, I have a printer setup as a local printer to a tcpip port so the VM can access a printer on our network.  But when I call the clientDoc.getPrintOutputController().printReport(printOptions); I get the error message ReportSDKPrinterException: Printer name could not be set.
    I have also on the side been testing using a small jsp modified from a working print preview.
    Here is the jsp:
    <%@ page contentType="text/html; charset=utf-8" %>
    <%@
       page import="com.crystaldecisions.sdk.occa.report.application.*,
      com.crystaldecisions.sdk.occa.report.data.*,
      com.crystaldecisions.sdk.occa.report.document.*,
      com.crystaldecisions.sdk.occa.report.lib.*,
      com.crystaldecisions.report.web.viewer.*"
    %>
    <html>
    <head>
    <title>Print Report</title>
    </head>
    <body>
    <%@ include file="AlwaysRequiredSteps_UnmanagedRAS.jsp"%>
    <%
      // Populate parameters
      clientDoc.getDataDefController().getParameterFieldController().setCurrentValue("", "TAB_ID", "Configuration");
      clientDoc.getDataDefController().getParameterFieldController().setCurrentValue("", "LOGO_LOCATION", "d:\\reports\\images\\highjump.gif");
      PrintReportOptions printOptions = new PrintReportOptions();
      printOptions.setPrinterName("Dell");
      clientDoc.getPrintOutputController().printReport(printOptions);
      clientDoc.close();
    %>
    </body>
    </html>
    The code from AlwaysRequiredSteps_UnmanagedRAS.jsp is:
    <%
    // This file contains the required steps to open an unmanaged report from a file path accessible to the RAS Server.
    // Modify this path to the location of the report on your system.
    String path = "rassdk://C:\\reports\\ReportList.rpt";
    // Create a new Report Application Session.
    ReportAppSession ra = new ReportAppSession();
    // Create a RAS service.
    ra.createService("com.crystaldecisions.sdk.occa.report.application.ReportClientDocument");
    // Set the RAS server to be used for the service.
    ra.setReportAppServer("10.192.183.196:1566");
    // Initialize RAS.
    ra.initialize();
    // Create the ReportClientDocument object.
    ReportClientDocument clientDoc = new ReportClientDocument();
    // Set the RAS server to be used.
    clientDoc.setReportAppServer(ra.getReportAppServer());
    // Open the report, and set the open type to Read Only.
    clientDoc.open(path, OpenReportOptions._openAsReadOnly);
    %>
    The result I get from running this is:
    HTTP Status 500 - An exception occurred processing JSP page /PrintReport.jsp at line 28
    type Exception report
    message An exception occurred processing JSP page /PrintReport.jsp at line 28
    description The server encountered an internal error that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: An exception occurred processing JSP page /PrintReport.jsp at line 28
    25:   PrintReportOptions printOptions = new PrintReportOptions();
    26:   printOptions.setPrinterName("DELL");
    27:  
    28:   clientDoc.getPrintOutputController().printReport(printOptions);
    29:
    30:   clientDoc.close();
    31: %>
    Stacktrace:
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    root cause
    javax.servlet.ServletException: com.crystaldecisions.sdk.occa.report.lib.ReportSDKPrinterException: Printer name could not be set: DELL---- Error code:-2147215357 Error code name:internal
      org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:916)
      org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:845)
      org.apache.jsp.PrintReport_jsp._jspService(PrintReport_jsp.java:133)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    root cause
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKPrinterException: Printer name could not be set: DELL---- Error code:-2147215357 Error code name:internal
      com.crystaldecisions.sdk.occa.report.lib.ReportSDKPrinterException.throwReportSDKPrinterException(Unknown Source)
      com.crystaldecisions.sdk.occa.report.application.PrintOutputController.printReport(Unknown Source)
      org.apache.jsp.PrintReport_jsp._jspService(PrintReport_jsp.java:120)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    root cause
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKPrinterNotFoundException: Printer name could not be set: DELL---- Error code:-2147215365 Error code name:printerNotFoundError
      com.businessobjects.crystalreports.printer.bean.a.try(Unknown Source)
      com.businessobjects.crystalreports.printer.bean.ReportPrinter.setPrinterName(Unknown Source)
      com.businessobjects.crystalreports.printer.bean.ReportPrinter.print(Unknown Source)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      com.crystaldecisions.sdk.occa.report.application.PrintOutputController.printReport(Unknown Source)
      org.apache.jsp.PrintReport_jsp._jspService(PrintReport_jsp.java:120)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    root cause
    java.awt.print.PrinterException: No printer named "DELL" could be found.
      com.businessobjects.crystalreports.viewer.core.f$a.a(Unknown Source)
      com.businessobjects.crystalreports.viewer.core.f.a(Unknown Source)
      com.businessobjects.crystalreports.printer.bean.a.try(Unknown Source)
      com.businessobjects.crystalreports.printer.bean.ReportPrinter.setPrinterName(Unknown Source)
      com.businessobjects.crystalreports.printer.bean.ReportPrinter.print(Unknown Source)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      com.crystaldecisions.sdk.occa.report.application.PrintOutputController.printReport(Unknown Source)
      org.apache.jsp.PrintReport_jsp._jspService(PrintReport_jsp.java:120)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    note The full stack trace of the root cause is available in the Apache Tomcat/7.0.53 logs.
    Apache Tomcat/7.0.53
    I would really appreciate any help in figuring out how to print to the RAS.
    Thanks in advance.

    Hi Jason,
    Could you please let us know the complete Business Objects version with Service Pack and Fix Pack?
    Actually the issue you are facing was identified as a bug and was fixed in Business Objects Enterprise XI 3.1 FixPack 2.2.
    Please go through the SAP Note: 1417374 - Error "Printer name could not be set" when printing using the RAS SDK.
    Hope this helps.
    Regards,
    Rajarsh

  • File download problem

    I am using the following code to present a file to the client to download when a report is generated. The code does what is suppose to, it presents a dialog box where the user can choose to open, save, or cancel the file download. However, when the file is downloaded it contains the client HTML at the bottom of the saved file. I checked the created file on the server and it does not contain the HTML at the bottom, so it is being added by the following jsp code when the file is presented to the user. Any help would be appreciated. BTW, this running on HP-UX 11i using oracle forms 10G.
       String RPT = request.getParameter("trig");
       String SDATE = request.getParameter("start_date");
       String EDATE = request.getParameter("end_date");
       String PRN = request.getParameter("prn");
    if(RPT != null)
         try {
              Runtime rt1;
              Process proc1;
              String[] doRefresh = {"/usr/bin/sh", "-c", "/usr/local/oracle/sql/st_tags/some_script '" + SDATE + "' '" + EDATE + "' '" + PRN + "'"};
              rt1 = Runtime.getRuntime();
              proc1 = rt1.exec(doRefresh);
              int exitVal = proc1.waitFor();
           String filename="/usr/local/oracle/sql/st_tags/temp/some_file.csv";
           response.setContentType("application/octet-stream");
           String disHeader="Attachment; Filename=some_file.csv";
           response.setHeader("Content-Disposition", disHeader);
           File fileToDownload=new File(filename);
           InputStream in=null;
           ServletOutputStream outs=response.getOutputStream();
           try {
              in=new BufferedInputStream
              (new FileInputStream(fileToDownload));
              int ch;
              while((ch=in.read()) != -1) {
              outs.print((char) ch);
           finally {
              if(in != null) in.close();
           outs.flush();
           outs.close();
           in.close();
         catch (Exception ignored) {}
       }

    Sorry, wasn't sure how important the HTML portion would be. Thanks for the response. Here is the HTML that is before and after the afore mentioned code.
    Before:
    <%@page import="java.lang.*, java.net.*, java.util.*, java.io.*"%>
    <%@page pageEncoding="UTF-8" contentType="text/html;charset=windows-1252"%>
    <%@page language="java" import="mil.uspfo.dpi.*" errorPage="default.jsp" %>
    <jsp:useBean id="AgnosticHostBean" class="mil.uspfo.dpi.AgnosticHostBean"
    scope="session">
    </jsp:useBean>
    <base href="http://<% out.print(AgnosticHostBean.getHostNameProperty() ); %>
    :7779/j2ee/">
    <html>
    <head>
    <title>Master Report</title>
    <link rel="stylesheet" type="text/css" href="styles/uspfo.css">
    </head>
    <body>
    <%@ include file="header.html" %>
    <h1>
    Master Report
    </h1>
    <form name="mstr_form" method="post">
    <p>Start Date:<input type="date" name="start_date">(example: YYYYMMDD)</p>
    <p>End Date  :<input type="date" name="end_date">(example: YYYYMMDD)</p>
    <p>Payroll # :<input type="text" name="prn"></p>
    <input type="SUBMIT" name="Button1" onClick="get_mstr_report()">
    <input type="hidden" name="trig" size="2">
    <br>
    <script type="text/javascript">
    function get_mstr_report() {
       document.mstr_form.trig.value="go";
    </script>AFTER:
    </form>
    <br>
    <%@ include file="footer.html" %>
    </body>
    </html>

  • Email attachment - can't find the file

    I'm using Oracle 9 and I am trying to use it to send an email. I know the version of Oracle is important with this task since sending an email changed in Oracle 10, I think.
    I want it to go to the hard drive and find an attachment to send. I'm okay at SQL/PL and I'm reviewing someone else's code and trying to make it work for me. It sends the mail find, but it can't seem to find the file for the attachment. What is wrong with attaching the file here or the file path?
    thank you.
    daniel
    DECLARE
            v_From           VARCHAR2(80) := '[email protected]';
            v_Recipient     VARCHAR2(80) := '[email protected]';
            v_Subject       VARCHAR2(80) := 'To the moon - and beyond!';
            v_Mail_Host    VARCHAR2(30) := '10.0.31.20';
            v_Mail_Conn utl_smtp.Connection;
            crlf                VARCHAR2(2)  := chr(13)||chr(10);
            pivAttached    VARCHAR2(4000)   := 'C:\Documents and Settings\dkessler\My Documents\PERM\Other\sql_emails\Perm_sel_vw_form_cc_ltd_20110526.txt';
              lvDirectory       VARCHAR2(100);
              lvFileName        VARCHAR2(100);
              lvLine            VARCHAR2(1000);
              lvMessage         VARCHAR2(32767);
              lvCc              VARCHAR2(100);
              lnCcCount         NUMBER(8);
              lnLastSemiColon   NUMBER(8);
              lnCurSemiColon    NUMBER(8);     
              TYPE lTypeFile IS TABLE OF VARCHAR2(200)
                INDEX BY BINARY_INTEGER;
              lTabFile           lTypeFile;
              lvFileHandle       sys.UTL_FILE.FILE_TYPE;
              lvSlashPosition         NUMBER;
              lvMessageLength    NUMBER;
              leMessageTooLong   EXCEPTION;
              leInvalidPath      EXCEPTION;
              lvMessageLengthgthExceeded   BOOLEAN := FALSE;
              pinMaxSize    NUMBER DEFAULT 9999999999;
            --rpt_name varchar2(50);
    BEGIN
            v_Mail_Conn := utl_smtp.Open_Connection('10.0.31.20', 25);
            utl_smtp.Helo(v_Mail_Conn, v_Mail_Host);
            utl_smtp.Mail(v_Mail_Conn, v_From);
            utl_smtp.Rcpt(v_Mail_Conn, v_Recipient);
            --rpt_name:='Perm_sagitec2011_UPD_user_access_fix_'||to_char(sysdate,'YYYYMMDD')||'.xls';
            --demo_mail.begin_attachment(v_Mail_Conn => v_Mail_Conn,mime_type => 'Application/Excel', inline => TRUE, filename => rpt_name);
            utl_smtp.Data(v_Mail_Conn, 'Date: '   || to_char(sysdate, 'Dy, DD Mon YYYY hh24:mi:ss') || crlf ||
                                                    'From: '   || '[email protected]' || crlf ||
                                                    'Subject: '|| v_Subject || crlf ||
                                                    'To: '     || v_Recipient || crlf ||
                                                     'Content-Type: multipart/mixed; boundary="DMW.Boundary.605592468"' || crlf ||
                                                      '--DMW.Boundary.605592468' || crlf ||
                                                      'Content-Type: text/plain; charset=US-ASCII' || crlf ||
                                                      'Content-Disposition: inline;' || crlf ||
                                                      'Content-Transfer-Encoding: 7bit' || crlf ||
                                                    crlf ||                                
                                                    'This is body text.'|| crlf
           --demo_mail.end_attachment(conn => conn);
                                         -- locate the final '/' or '\' in the pathname ...
                         BEGIN
                                 lvSlashPosition := INSTR(pivAttached, '/', -1 );
                                 IF lvSlashPosition = 0 THEN
                                    lvSlashPosition := INSTR(pivAttached, '\', -1 );
                                 END IF;
                                 -- separate the filename from the directory name ...
                                 lvDirectory     := SUBSTR(pivAttached, 1, lvSlashPosition - 1 );
                                 lvFileName      := SUBSTR(pivAttached, lvSlashPosition + 1 );
                                 -- open the file ...
                                 lvFileHandle := UTL_FILE.FOPEN(lvDirectory, lvFileName, 'r' );
                                 -- generate the MIME boundary line ...
                                 lvMessage := crlf || '--DMW.Boundary.605592468' || crlf ||
                                 'Content-Type: application/octet-stream; name="' || lvFileName || '"' || crlf ||
                                 'Content-Disposition: attachment; filename="' || lvFileName || '"' || crlf ||
                                 'Content-Transfer-Encoding: 7bit' || crlf || crlf ;
                                 lvMessageLength := lvMessageLength + LENGTH(lvMessage);
                                 utl_smtp.write_data ( v_Mail_Conn, lvMessage );
                                 -- and append the file contents to the end of the message ...
                                 LOOP
                                     UTL_FILE.GET_LINE(lvFileHandle, lvLine);
                                     IF lvMessageLength + LENGTH(lvLine) > pinMaxSize THEN
                                        lvMessage := '*** truncated ***' || crlf;
                                        utl_smtp.write_data ( v_Mail_Conn, lvMessage );
                                        lvMessageLengthgthExceeded := TRUE;
                                        RAISE leMessageTooLong;
                                     END IF;
                                     lvMessage := lvLine || crlf;
                                     utl_smtp.write_data ( v_Mail_Conn, lvMessage );
                                     lvMessageLength := lvMessageLength + LENGTH(lvMessage);
                                 END LOOP;
                              EXCEPTION
                                 WHEN NO_DATA_FOUND THEN
                                   NULL;
                                 WHEN UTL_FILE.INVALID_PATH THEN
                                   RAISE_APPLICATION_ERROR (-20101,'Invalid path while opening attachment '||pivAttached );
                                 WHEN OTHERS THEN 
                                   RAISE;
                              END;
                              lvMessage := crlf;
                              utl_smtp.write_data ( v_Mail_Conn, lvMessage );
                              -- close the file ...
                              UTL_FILE.FCLOSE(lvFileHandle);
           utl_smtp.Quit(v_mail_conn);
           --pivAttached
    EXCEPTION
    WHEN utl_smtp.Transient_Error OR utl_smtp.Permanent_Error then
       raise_application_error(-20000, 'Unable to send mail: '||sqlerrm);
    END;
    /

    The important thing is that a file attachment does not mean pointing the mail API at a file and say "+attach thyself+".
    In technical terms, the attachment is simply another piece in the mail (aka MIME) body. There can be numerous "pieces" - separated by text boundary lines. Each piece with is own header and data.
    So an e-mail with an attachment does not mean mail arrives with a file piggybacking on it. It means a MIME body with multiple "pieces". Where one such "piece" is the uu-encoded contents of the file, with is header describing what the contents is.
    Depending on the mail API your code use, your code may need to construct this entire MIME (e-mail) body - including reading the original file, encoding it if binary, and inserting that as a "piece" into the MIME body.
    This you would do when for example using UTL_SMTP - as it only does the SMTP protocol part (the conversation with the mail server) and not the constructing MIME body part.
    If you for example use UTL_MAIL, it generates a (very basic/primitive) MIME body and uses UTL_SMTP to transmit it. UTL_MAIL expects you to pass the file contents to insert as a "piece" into the MIME body as a LOB. Not as a physical path or UNC that points to some file somewhere. Your code needs to read that content of the file into a LOB... and then call UTL_MAIL.
    As your code is PL/SQL, it is server side code. It runs inside an Oracle server process. If the file contents to attach is on the client, then that client (browser, Java, TOAD, .Net, Perl, whatever) needs to read that local file's content and use DBMS_LOB calls to instruct PL/SQL on the server to create a LOB containing that contents. Then the PL/SQL code can call UTL_MAIL and tell it to write the contents of that LOB into the MIME body of the e-mail.

  • Differing Web Service responses between 10.1.3.3 and 11g

    In our production environment we have deployed several ESB projects. I am currently going through these projects and attempting to update them to 11g. These projects follow the same basic design. In the 101.3.4 environment they consist of an exposed routing service generated from a schema document which routes to a Web service adapter. The exposed service is called from our asset management system the service adapter is invoking a PeopleSoft Asynchronous one way web service. In 11g this became two web service adapters (the first as an exposed one-way service) linked by a mediator.
    In our 101.3.4 environment this process worked without exceptions. After upgrading the project our asset management system would raise an exception after each call to the exposed service. Interestingly I can check em and also PeopleSoft and the payload is successfully delivered. When I review the instance in em there are no faults or exceptions. I have auditing turned on and can see that the service, mediator and reference steps have all successfully completed. When I look at the log for the particular instance I do receive a warning which states:
    Error parsing envelope: most likely due to an invalid SOAP message.: Unexpected EOF in prolog\r\n at [row,col {unknown-source}]: [1,0]
    I used soapUI to debug the service calls. If I call the PeopleSoft web service without using the mediator project I receive the following response:
    Tue Aug 18 20:55:37 PDT 2009:DEBUG:<< "HTTP/1.1 200 OK[\r][\n]"
    Tue Aug 18 20:55:37 PDT 2009:DEBUG:<< "HTTP/1.1 200 OK[\r][\n]"
    Tue Aug 18 20:55:37 PDT 2009:DEBUG:<< "Date: Wed, 19 Aug 2009 03:57:01 GMT[\r][\n]"
    Tue Aug 18 20:55:37 PDT 2009:DEBUG:<< "Content-Length: 0[\r][\n]"
    Tue Aug 18 20:55:37 PDT 2009:DEBUG:<< "Content-Type: text/xml; charset=UTF-8[\r][\n]"
    Tue Aug 18 20:55:37 PDT 2009:DEBUG:<< "X-Powered-By: Servlet/2.4 JSP/2.0[\r][\n]"
    When I call the exposed service in my 10.1.3.4 ESB project I receive the following response:
    Tue Aug 18 20:57:26 PDT 2009:DEBUG:<< "HTTP/1.1 200 OK[\r][\n]"
    Tue Aug 18 20:57:26 PDT 2009:DEBUG:<< "HTTP/1.1 200 OK[\r][\n]"
    Tue Aug 18 20:57:26 PDT 2009:DEBUG:<< "Date: Wed, 19 Aug 2009 03:57:25 GMT[\r][\n]"
    Tue Aug 18 20:57:26 PDT 2009:DEBUG:<< "Content-Length: 212[\r][\n]"
    Tue Aug 18 20:57:26 PDT 2009:DEBUG:<< "Content-Type: text/xml;charset=utf-8[\r][\n]"
    Tue Aug 18 20:57:26 PDT 2009:DEBUG:<< "X-Powered-By: Servlet/2.4 JSP/2.0[\r][\n]"
    Tue Aug 18 20:57:26 PDT 2009:DEBUG:<< "[\r][\n]"
    Tue Aug 18 20:57:26 PDT 2009:DEBUG:<< "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">[\n]"
    Tue Aug 18 20:57:26 PDT 2009:DEBUG:<< " <soapenv:Body/>[\n]"
    Tue Aug 18 20:57:26 PDT 2009:DEBUG:<< "</soapenv:Envelope>"
    You will notice that what is returned is a soap envelope which has an empty body.
    If i then make the call through the 11g exposed service I get the following response:
    Tue Aug 18 20:58:46 PDT 2009:DEBUG:<< "HTTP/1.1 202 Accepted[\r][\n]"
    Tue Aug 18 20:58:46 PDT 2009:DEBUG:<< "HTTP/1.1 202 Accepted[\r][\n]"
    Tue Aug 18 20:58:46 PDT 2009:DEBUG:<< "Date: Wed, 19 Aug 2009 03:58:46 GMT[\r][\n]"
    Tue Aug 18 20:58:46 PDT 2009:DEBUG:<< "Content-Length: 0[\r][\n]"
    Tue Aug 18 20:58:46 PDT 2009:DEBUG:<< "Content-Type: [\r][\n]"
    Tue Aug 18 20:58:46 PDT 2009:DEBUG:<< "X-ORACLE-DMS-ECID: 0000ICkncqY0bq3pzk8DyW1ANuRl000035[\r][\n]"
    Tue Aug 18 20:58:46 PDT 2009:DEBUG:<< "X-Powered-By: Servlet/2.5 JSP/2.1[\r][\n]"
    Tue Aug 18 20:58:46 PDT 2009:DEBUG:<< "[\r][\n]"
    I believe the exception being thrown by the asset management system is a result of the zero length, empty content-type being returned from my mediator service or possibly the fact that the return code is 202 as opposed to 200.
    First I would like to know if anyone has experienced the same behavior and whether this behavior is by design. Is a response required from all services even if they are one way?
    Second if this is by design is it possible within the mediator project to force a return code of 200 and a response that includes an empty soap envelope?
    Of course any other solutions are welcome as well. I am leaning towards a solution which can be implemented within my mediator project as I have much more flexibility there then either of the other participating systems.
    Thank you very much.

    After exploring this issue with Oracle Support and doing some of my own research I believe that the issue is not the SOA Suite but rather the third party system which was calling exposed service in the SOA Suite. According to the link below both the response returned from the 10.1.3.4 esb project and the 11.1.1.1 mediator project are valid. What is returned from calling a one-way service appears to be up to the implementer of the service.
    http://www.w3.org/TR/2006/NOTE-soap11-ror-httpbinding-20060321/
    "This SOAP 1.1 request optional response HTTP binding, in conjunction with the SOAP 1.1 binding [SOAP 1.1], can be used for sending request messages with an optional SOAP response. This binding augments the SOAP 1.1 binding by allowing that the HTTP [RFC 2616] response MAY have a 202 status code and the response body MAY be empty. Note that the HTTP [RFC 2616] specification states "the 202 response is intentionally non-committal" and so any content in the response body, including a SOAP Envelope, MAY not be an expected SOAP response"

  • RoboHelp 8 HTML - Toolbar Button: Email with Link to Topic

    Realized this would be better on this forum than the WebHelp forum:
    Within a skin, I'd like to create a custom email button on my toolbar that would allow a user to email a direct link to a specific file in my RoboHelp project (a Share this Topic feature).
    I thought it might be something like this:
    window.location=('mailto:[email protected]?Subject=Useful Step-by-Step&body=This Step-by-Step may be helpful for you: ' + window.location)
    but that just calls the toolbar, not the topic; the focus isn't on the correct window.
    I have the following code that I could imbed on each topic page, but for consistency, I'd like to have this functionality on the toolbar instead. Has anyone done this or come across this before?
    <p><script type="text/javascript">
    var mailSubject = 'Useful Information';
    var mailBody = 'This page might help: ' + location.href;
    var mailDisplay = 'Click here for a demo.';
    document.write(
    '<a href="mailto:[email protected]'
    + '?subject=' + escape(mailSubject)
    + '&body=' + escape(mailBody)
    + '">' + mailDisplay + '</a>'
    );</script></p>

    For a number of reasons we have decided to take a different approach.
    I was trying to include a button in the toolbar for launching the email program to send feedback and comments home in a prepopulated mail subject and body.
    I think instead, we can add this as a link in the master page using a modification of Peter's snippet 38 "Email this topic". This rsolves all the problems i was having (i am a novice tweaker not a scripter or coder) and we are able to get our first skin ready in the new Help in time for the forthcoming release candidate.
    However, my colleague also wants to add another link using this snippet as origianlly intended, but the body includes a link to the topic file, which in our case is stored locally. We are using webhelp in local product installations rather than via a file server. Obviously the link doesn't help anyone operaitng on another machine.
    How can the Javascript be modified to actually send the topic file itself?
    TIA
    Rob

  • Ergent problem with the jsp file access in tomcat. HELP...

    I use tomcat as my server, I have one JSP file located in :
    webapps\abc\war\WEB-INF\jsp\index.jsp
    You see my project name is abc, I want to access the index.jsp file, I define another jsp file in the path: webapps\abc callled outside.jsp. I want to use outside.jsp to invoke the index.jsp.
    Inside outside.jsp it is :
    <html>
    <head>
    <title>index</title>
    </head>
    <body>
    <%@ include file="war/WEB-INF/jsp/index.jsp" %/>
    </body>
    </html>
    When I open the browser, and access, http://localhost:8080/abc/outside.jsp , the content of index.jsp was shown as expect. But, all the link pages of the index.jsp can not shown (PS: the link pages is located in the same path as index.jsp, they are all jsp files). I guess the problem may be that the <%@ include file="war/WEB-INF/jsp/index.jsp" %/> inside outside.jsp include the index.jsp as a static file. Is there any method to make all the link pages of index.jsp can be shown when call from outside.jsp???HELP
    Message was edited by:
    Mellon
    Message was edited by:
    Mellon

    I don't know why your links can't be shown, but I can tell you that your suspect:
    I guess the problem may be that the <%@ include file="war/WEB-INF/jsp/index.jsp" %/> inside outside.jsp include the index.jsp as a static file.is wrong, because included jsp is dynamic, not static.

  • Null pointer exception in com.crystaldecisions.sdk.occa.report.application.ControllerBase.checkViewReportRight

    I am testing BOE 4.0 with a simple jsp based on the samples.  The code is what I used to test BOE xi 3.1.  But I ran into some report display inconsistencies with 3.1 so I am trying 4.0.  The code below works in 3.1  But in 4.0, I get the report viewer screen coming up but get a null pointer exception coming to the screen.
    2014-06-18 13:48:01
    java.lang.NullPointerException
    at com.crystaldecisions.sdk.occa.report.application.ControllerBase.checkViewReportRight(ControllerBase.java:114)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.getPage(ReportSource.java:945)
    at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.getPage(AdvancedReportSource.java:343)
    at com.businessobjects.report.web.event.PageListener.renderContentLocally(PageListener.java:394)
    at com.businessobjects.report.web.event.PageListener.getPage(PageListener.java:181)
    at com.businessobjects.report.web.event.PageListener.updatePage(PageListener.java:123)
    at com.businessobjects.report.web.event.UpdatePageEvent.processListener(UpdatePageEvent.java:47)
    at com.businessobjects.report.web.event.ViewerBroadcaster.broadcast(ViewerBroadcaster.java:109)
    at com.businessobjects.report.web.event.EventQueue.processEvents(EventQueue.java:53)
    at com.businessobjects.report.web.component.ViewerContainer.processEvents(ViewerContainer.java:1403)
    at com.businessobjects.report.web.WorkflowController.doEventProcessing(WorkflowController.java:353)
    at com.businessobjects.report.web.WorkflowController.doLifecycle(WorkflowController.java:255)
    at com.businessobjects.report.web.WorkflowController.doAsyncLifecycle(WorkflowController.java:106)
    at com.crystaldecisions.report.web.viewer.CrystalReportViewerUpdater._processHttpRequest(CrystalReportViewerUpdater.java:61)
    at com.crystaldecisions.report.web.ServerControl.processHttpRequest(ServerControl.java:345)
    at com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet.doUpdate(CrystalReportViewerServlet.java:156)
    at com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet.doPost(CrystalReportViewerServlet.java:144)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:662)
    Here is the AlwaysRequiredSteps_UnmanagedRas.jsp
    <%
    String path = "rassdk://C:\\reports\\asn.rpt";
    ReportAppSession ra = new ReportAppSession();
    ra.createService("com.crystaldecisions.sdk.occa.report.application.ReportClientDocument");
    ra.setReportAppServer("10.189.15.175:1566");
    ra.initialize();
    ReportClientDocument clientDoc = new ReportClientDocument();
    clientDoc.setReportAppServer(ra.getReportAppServer());
    clientDoc.open(path, OpenReportOptions._openAsReadOnly);
    %>
    Here is the OpenReport.jsp
    <%@ page contentType="text/html; charset=utf-8" %>
    <%@
       page import="com.crystaldecisions.sdk.occa.report.application.*,
      com.crystaldecisions.sdk.occa.report.data.*,
      com.crystaldecisions.sdk.occa.report.lib.*,
      com.crystaldecisions.report.web.viewer.*,
      com.crystaldecisions.sdk.occa.report.definition.*"
    %>
    <html>
    <head>
    <title>Preview Report</title>
    </head>
    <body>
    <%@ include file="AlwaysRequiredSteps_UnmanagedRAS.jsp"%>
    <%
      Tables oTablesCollection = clientDoc.getDatabaseController().getDatabase().getTables();
      for(int i = 0; i < oTablesCollection.size(); i++) {
          // We'll get two copies of the original table, change one, and use set table.
          ITable originalTable = oTablesCollection.getTable(i);
          ITable changedTable = oTablesCollection.getTable(i);
          IConnectionInfo newConnectionInfo = new ConnectionInfo();
          PropertyBag attributes = new PropertyBag();
          attributes.putBooleanValue(PropertyBagHelper.CONNINFO_SSO_ENABLED, false);
          attributes.putStringValue(PropertyBagHelper.CONNINFO_CRQE_DATABASETYPE, "JDBC (JNDI)");
          attributes.putStringValue(PropertyBagHelper.CONNINFO_DATABASE_DLL, "crdb_jdbc.dll");
          attributes.putStringValue(PropertyBagHelper.CONNINFO_CRQE_DATABASENAME, "");
          attributes.putBooleanValue(PropertyBagHelper.CONNINFO_CRQE_SQLDB, true);
          PropertyBag logonProperties = new PropertyBag();
          logonProperties.putStringValue("JDBC Connection String", "!oracle.jdbc.driver.OracleDriver!jdbc:oracle:thin:{userid}/{password}@10.189.12.248:1521:gbg");
          logonProperties.putBooleanValue("Trusted_Connection", false);
          logonProperties.putBooleanValue("Use JDBC", true);
          logonProperties.putStringValue("Database Class Name", "oracle.jdbc.driver.OracleDriver");
          logonProperties.putStringValue("Connection URL", "jdbc:oracle:thin:@10.189.12.248:1521:gbg");
          logonProperties.putStringValue("Server", "10.189.12.248");
          attributes.put(PropertyBagHelper.CONNINFO_CRQE_LOGONPROPERTIES, logonProperties);
          attributes.putStringValue("QE_ServerDescription", "10.189.12.248");
          newConnectionInfo.setKind(ConnectionInfoKind.CRQE);
          newConnectionInfo.setUserName("dsdone");
          newConnectionInfo.setPassword("dbuser");
          newConnectionInfo.setAttributes(attributes);
          changedTable.setQualifiedName("DSDONE" + "." + changedTable.getName());
          changedTable.setConnectionInfo(newConnectionInfo);
          // Commit the changes by calling the setTableLocation method from
          // the Database controller with the new table
          clientDoc.getDatabaseController().setTableLocation(originalTable, changedTable);
      // Create a Viewer object
      CrystalReportViewer viewer = new CrystalReportViewer();
      // Set the name for the viewer
      viewer.setName("Crystal_Report_Viewer");
      // Set the report source for the  viewer to the ReportClientDocument's report source
      viewer.setReportSource(clientDoc.getReportSource());
      // Process the http request to view the report
      viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), out);
      // Dispose of the viewer object
      viewer.dispose();
      // Release the memory used by the report
      clientDoc.close();
    %>
    </body>
    </html>

    Hi Jason,
    Call any one of the methods
    viewer.dispose(); or clientDoc.close();
    Do not use both in BI 4.x version.
    Test the same and let me know if it works.
    Thanks,
    Prithvi

Maybe you are looking for