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

Similar Messages

  • Cannot view or play audio or video coded for windows media player, and do not see javascript

    I designed a website that uses a little bit of JavaScript. It displays fine in IE (9), but not in Firefox. Does anyone know why, and what the fix is?
    Also, and more importantly, I coded audio and video files with Windows media player's class id. They will not show or (obviously) play in Firefox. I downloaded and installed the plug in for Firefox, but no change. I'm sure I'm not the only one to have run across this problem, and I'm surprised that Mozilla hasn't built a fix in the 4.0 version. So, any ideas out there?
    Thanks!

    Firefox won't play the media file if there is a classid specified in the object tag. You either need to use conditional code to hide an object without classid for Firefoz from IE or use an embed for Firefox.
    <pre><nowiki><object id="(ID)" type="application/x-oleobject" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
    <param name="(NAME)" value="(VALUE)> // enter parameters for IE here
    <!--[if !IE]>-->
    <object data="(SOURCE)" type="application/x-mplayer2" height="xxx" width="xxx">
    <param name="(NAME)" value="(VALUE)"> // enter parameters for Firefox here
    </object>
    <!--<![endif]-->
    </object>
    </nowiki></pre>

  • How to include HTML file in JSP using HTML elements or Javascript?

    Hi,
    I have around 15000 static html files one for each item which we display each upon invoking an item.The HTML file should be part of a JSP file.
    Please note that the name of the HTML file is determined dynamically
    Placing all the HTML files within the web application does not give us good performance so i would like to put all of them in the webserver.
    I am not able to include the file in the JSP using the jsp:include attribute if i place the HTML files in the webserver ,
    in order to do that i think should use either HTML element or javascript to include the HTML in the JSP.is there any alternative to <Jsp:include>
    Does anyone have an idea how to include the HTML file and take advan tage of webserver?
    Any ideas are appreciated

    What you need to do is simply read the HTML file from the disk and dump it out to the outputstream. It really is that simple.
    There's no reason you need to include all 15000 files in the actual WAR, you can place those files any place handy that is easy for the application to see (in another directory, or accessible from a file server if you have multiple front ends).
    Then, just write a utiility function that takes the output stream (i.e. the 'out' JSP variable), and the file name, read the file, and write it to the stream.
    If you start noticing performance issues, then you can try doing some caching, but truth is your OS should be doing that for you.
    But, truth be told that's the only practical way to do it.
    Another solution would be to use JavaScriipt and XMLHttpRequest (i.e "AJAX") to load the file at the client side, and simply replace a tag with the results.
    That's also pretty trivial to write, any web site talking about AJAX should give you hint there.
    Of course, that won't work for folks who have JavaScript turned off, or some other incompatible browser, whereas the server side solution obviously works everywhere.

  • Deployed application does not contain javascript files

    Hello,
    I am a unexperienced user of the BPM Studio. When I start my application in Oracle BPM my application does not contain the javascript files. It is quite weird, because the path to the .js files is proper - the application works on other computers. I have observed several weird things:
    - when I lookup the application in Firebug, when I try to lookup the source of the .js files, firebug console presents something like this (i deleted most of the html so that it is easy to read):
    <html><head><title>Apache Tomcat/5.5.15 - Error report</title>
    <body>HTTP Status 404 - /workspace//webRoot/webResources/js/jquery-1.4.2.min.js
    Status report message /workspace//webRoot/webResources/js/jquery-1.4.2.min.js
    The requested resource (/workspace//webRoot/webResources/js/jquery-1.4.2.min.js) is not available.
    <h3>Apache Tomcat/5.5.15</h3></body></html>- as i said - the application works just fine on other computers, without having to edit the path to the .js files
    - the application doesn't deploy the application (at least I think it does not) in the OraBPMStudioHome - the application is in the following folder:
    C:\Users\<username>\AppData\Local\VirtualStore\Program Files\OraBPMStudioHome\webapps\workspace\webRoot
    I am using OracleBPM Studio 10gR3, my system is Windows 7 Proffessional 64bit. Could the fact, that my system is 64 bit, cause the error?
    I haven't changed anything in the web.xml, workspace.properties files.
    It looks as if the server didn't include my js files. What may be causing this? I tried to locate the folder where the Tomcat Server deployes the application, and copying the js files where they should be manually, but that didn't work out well - the web application still does not see them.
    By the way, the double // slashes in the path to the .js file are fine on other computers, but is that proper?
    My application uses other scripts, not only jQuery, so changing the link to the jQuery file, won't work.
    I'd be very happy for any solution, thanks in advance!
    Chris Mejka
    Edited by: 789731 on 2010-08-20 01:20

    Nope, that's not the case; all the imports are handled by the <fuego:webResources /> tag, like this:
    <script type="text/javascript" src="<fuego:webResources relativePath='js/jquery-1.4.2.min.js'/>"></script>If that helps, the folder structure, with the .js files is as follows: ../webRoot/webResources/js/ ....
    As I said before - none of my colleagues, who use this application, has this problem, the application runs fine on other computers. The only (or at least that's what I think) difference, is that I use a 64 bit OS... Maybe that's the problem? Or maybe something is wrong in one of my BPM configuration files?
    Edited by: 789731 on 2010-08-20 02:29
    Edited by: 789731 on 2010-08-20 04:42

  • How to include external files in JSP

    hi,
    How to include external files like image or javascript in to jsp pages.
    I am using MVC frame work. So i have to use request dispatcher. While calling the pages trough dispatcher the external files are missing from the output. Also am using tomcat as server,web.xml(deployment descriptor ) is also configured.
    regards
    sree

    When you use the request dispatcher, the relative path for all your ressources becomes the relative path of your calling serlvet and not the JSP/servlet that you call. Make sure to use the full relative path such as:
    /PATH_TO_YOUR_DIRECTORY/myRessource.ext
    NOT
    SOME_DIRECTORY/myRessource.ext
    Jeff

  • How do I add an included jsp to my project and not get a compile error?

    Hi,
    I have a project with some included jsp's however if I add them to the project, when I build I get a compile error as the jsp uses variables from the calling jsp.
    Any ideas on how to get round this.
    Thanks
    DM

    There are two main ways that I deal with this problem (yeah, it sucks, but it sort of makes sense that it happens...) (I presume you're talking static include here...)
    #1 - name the included file with an extension that JDev will not try to compile (.jspf - for JSP Fragment - is common) Then it will be compiled in with the including page, but won't gag the project compilation. Advantage - it works, and you find out at compile time if you hosed up the variable reference. Disadvantage: JDev tries really, really, really hard to keep you from naming a JSP file with an extension of .jspf I normally create the .jsp file in JDev, remove it from the project, rename the file outside of JDeveloper, then add it back to the project - pain in the butt, but it works (and you probably aren't building scads of these included files...)
    #2 - add the variable to be referenced to the pageContext implicit object as an attribute in your including page (ex, <% pageContext.setAttribute("myVar", myVar); %>), then reference that attribute in your included JSP (ex, <%= pageContext.getAttribute("myVar") %>) . It will compile fine (as the compiler has no way of knowing if the pageContext attribute actually exists, it just sees that the syntax is good and motors along merrily. Advantage: don't have to have differently named JSP files (which isn't actually a big deal). Disadvantage: You hvae to add the variable to the pageContext (and you have to always add Object derivatives, as primitives won't go into a hash) and you don't find out if you screwed the variable up until runtime (when it tries the getAttribute, which could return null if you didn't properly set it to start with) vs at compile-time w/ the direct reference.
    HTH!
    Jim

  • Include jsp file

    There are 2 jsp files: main.jsp, process.jsp.
    In the main.jsp,
    String name="java";
    <jsp:include page="process.jsp" flush="true" />
    .....In the process.jsp,
    String name="abc";
    ....My problem is the parameter - name have not changed to "abc" .
    How can I solve this problem ?
    thanks.

    Hi,
    Dont think that it should happen like that, the diffrence between <jsp:include> and <%@ include> is that jsp:include is a dymanic include i.e. the processed contents of the jsp flie are added to your page, while @ include is a static include meaning that the contents are first put together as one big jsp and then the contents are processed.
    That is why the original jsp is recompiled, and your server should automatically determine that when a parent jsp is to be recompiled when a included jsp is changed. What server are you using?
    And as in jsp:include the processed result (html) is added the variable declairations or manipulations in a child will not be accesable in the parent, while they will be in case of @include.
    Hope this helps
    Regards
    Omer

  • Included JSPs not displaying anything

    Hi there
    I'm using the JSP directive to include a small JSP into the main one, using
    <jsp:include page="/Summary.jsp">
    Everything was working fine until I did a change in the Summary.jsp and the included page just stopped generating the HTML. I have a feeling that it is a compilation error, but I just don't get anything in the screen or in the console window for catalina.
    I tried using the <%@ page errorPage="/DisplayException.jsp"%> in the included jsp (Summary.jsp) but the redirection does not happen at all.
    Do I have to turn some kind of flag in Tomcat to see the errors (either compilation or runtime) that happen in the included JSPs?
    I'm using Tomcat 5.0.27 and JDK 1.5 running on Windows.
    Thanks in advance for your time and help
    Leo.

    The problem is that you are getting an error after
    the response is already committed (HTML is already
    written to the client machine). That means that the
    server can not redirect to the error page.
    Your option are to make sure that you do not flush
    the output buffer when you do the include:
    <jsp:include page="..." flush="false"/>
    and make sure that the page that is doing the include
    has a big enough buffer:
    <%@page buffer="20kb" %> (at the top of the page)
    Setting this high enough should make sure that your
    response is not committed before your error occurs,
    and so you should get redirected to the error page.
    The higher it is set, though, the more memory your
    r server will eat up, so remember to turn it back
    down when debugging is done.Hi Steve
    I did that and I could finally see the exception. Thanks a lot for your help
    Leo.

  • Include jsf file in a jsp page

    Hi Everyone,
    I have a plain jsp page with no JSF Components, but it has a jsp:include tag which is another jsp file which contains jsf components.
    When i try to run the plain jsp file ... i get the following error...
    java.lang.IllegalStateException: Cannot forward after response has been committed
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:324)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
         at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:589)
         at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
         at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
         at org.apache.jsp.DynamicWebpart_jsp._jspService(DynamicWebpart_jsp.java:278)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
         at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:589)
         at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
         at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
         at org.apache.jsp.Webpart_jsp._jspService(Webpart_jsp.java:302)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
         at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:589)
         at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
         at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
         .......... so.....on........
    I saw the source code for the plain jsp file and the error is because of including the jsp file with jsf components.
    The contents of both the jsp file is given below
    Plain jsp file
    DWStaticJSP.jsp
    <%@ page import="java.util.*" %>
    <%@ page import="com.mirus.bi.jsp.*" %>
    <%@ page import="com.mirus.bi.util.Log" %>
    <% Log.logDbg("*******before calling the faces file from DWStatic :"+rSetting.getStaticJSPFileName()); %>
    // name of the file name : /faces/report_palm.jsp
    <jsp:include page="<%=rSetting.getStaticJSPFileName()%>" flush="false" >     
                   <jsp:param name="DMode" value="DBoard" />
    </jsp:include>
    Jsp file with JSF component
    it is stored in faces folder
    /faces/report_palm.jsp
    <%@ page contentType="text/html" %>
    <%@ page import="com.mirus.bi.util.Log" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://mirus.com/jsftaglib" prefix="my" %>
    <f:view>
              <h:outputText value="Store Name:" />
              <h:outputText value="#{palmReportUIHandler.currentStoreDisplay}" />
              <h:outputText value="Year:" />
              <h:outputText value="#{palmReportUIHandler.currentYear}" />
              <h:outputText value="Month:" />
              <h:outputText value="#{palmReportUIHandler.currentMonth}" />
    </f:view>
    The Configuration in the web.xml for faces Servlet is given below
    <servlet>
    <servlet-name>FacesServlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <!-- Faces Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>FacesServlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    Does anybody know the solution to this problem
    Any kind of help will be highly appreciated.
    Pinkesh

    Hi Adam Winer,
    I want to try your solution.
    just wanted some more clarification .....
    So, let's say you have:
    DWStaticJSP.jsp: plain JSP
    report_palm.jsp: JSF JSP included by DWStaticJSP.jsp
    What you should do is use an URL of:
    /faces/DWStatic.jsp
    to access the outer plain JSP (yes, even though it's not really a faces page), and then have
    /faces/DWStatic.jsp include just plain /report_palm.jsp.
    In essence, the critical thing is that the FacesServlet wraps the entire request - FacesServlet cannot run
    for just a piece of the request.My question is where should i store the DWStatic.jsp file ... As u said i should acces it using /faces/DWStatic.jsp do i need to save it in the faces folder or just in the web app root.
    I cant save the DWStatic.jsp in the faces folder as this file is used for lot of different purpose in my company application.
    So can u give me a solution where in i can keep the DWStatic.jsp in the web-root folder and still try your solution
    Also is this the right setting for facesServlet in the web.xml.
    <servlet>
    <servlet-name>FacesServlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <!-- Faces Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>FacesServlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    Whatever follows below this line is the describtion of the web appp structure which i have in my company.
    We have an application where in all the jsp files are stored in the web-app root folder.....
    I will be using alphabets like a.jsp ... b.jsp .... to keep the explanation small...
    I have an a.jsp file which includes a b.jsp file which in turn includes a c.jsp......
    Now we have started using JSF.....
    Now as a developer .... i want the c.jsp to include a d.jsp file which contains JSF components...
    The thing is i cant change the location of a.jsp, b.jsp and c.jsp......
    Can u tell me how i should call " a.jsp" ... imean the url so that the "d.jsp" file gets processed properly.
    Also where should i save all the jsp files and what config is requiered in the web.xml for your solution
    I thank you for your help
    Pinkesh

  • I can not download any files using Safari ? when I choose to download application file the URL include the file name and stop responding. Any help??

    I can not download any files using Safari ? when I choose to download application file the URL include the file name and stop responding. Any help??

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. For instructions, launch the System Preferences application, select Help from the menu bar, and enter “Set up a guest account” (without the quotes) in the search box.
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem(s)?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault in Mac OS X 10.7 or later, then you can’t enable the Guest account. The Guest login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:
    Be sure your Mac is shut down.
    Press the power button.
    Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
    Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    *Note: If FileVault is enabled under Mac OS X 10.7 or later, you can’t boot in safe mode.
    Test while in safe mode. Same problem(s)?
    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of steps 1 and 2.

  • Include .PDF file in JSP

    Am I able to include .pdf file in a .jsp page? If it is yes, how to do it?

    Not directly, no.
    You use HTML to include it as a seperate html frame/iframe, but nothing specific to JSP will help here.
    cheers,
    evnafets

  • PS CS5.1 [was: 5.5] will not see my Canon 550d cr 2 files

    I am running a mac on os x and Photoshop 5.1 . I just purchased a canon rebel 550d (T5i I think) It will not see any of the images. This must be an Adobe issue as the MAc finder and preview sees the images.
    SO I have downloaded and tried to install various camera raw updates. 5.1 5.7 6.1 6.4 7.1 7,3 nothing seems to work indeed one of them failed to open. ver 6.1 will not open as an error code comes up. this error code relates to not being elligable for the version, yet it says cs 5. cs 5.5 and 6 are worthy.
    CAn someone help please.
    regards Paul
    Message was edited by: Paul the Artist

    Paul the Artist wrote:
    I am running a mac on os x and Photoshop 5.5 .
    Do you mean Photoshop 5.5 (shipped in 1999) or Photoshop CS5 (shipped in 2010)?
    If 5.5 (1999), then it's unlikely to ever read Raw files.
    If you mean CS5 then try Help > Updates to update your Camera Raw to version 6.7.
    Direct link for Camera Raw 6.7 for Mac
    http://www.adobe.com/support/downloads/detail.jsp?ftpID=5370
    The 550D has been fully supported since Raw 6.1
    http://helpx.adobe.com/creative-suite/kb/camera-raw-plug-supported-cameras.html

  • Jsp:include tag does not preserve encoding of the text

    hi
    I am using Apache web server and Tomcat 4.1.
    I have a jsp:include tag (in say test1.jsp) and I am trying to include a data1.html file. This html file contains UTF-8 encoded text. When this JSP is executed, the UTF-8 text is displayed as garbage characters.
    I have included following in the JSP
    <%@ page contentType="text/html; charset=UTF-8" %>
    I have included following in the info.html
    <meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
    However if I rename the info.html to data1.jsp and then include, the UTF-8 text gets displayed correctly.
    I suppose, the JSP engine does not interprete the content of the html file correctly according to its encoding.
    Where as if it is a .jsp, then it is int erpreting it appropriately?
    Can anybody throw some lite on this?
    regards
    haresh
    sample files.......
    test1.jsp..........
    <%@ page contentType="text/html; charset=UTF-8" %>
    <%
    response.setContentType("text/html; charset=UTF-8");
    %>
    <HTML>
    <HEAD>
    <meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
    </HEAD>
    <BODY>
    <jsp:include page="data1.html" flush="true"/>
    </BODY>
    </HTML>
    data1.html.....
    <meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
    <br>
    &#2361;&#2366;&#2340;&#2368; &#2328;&#2381;&#2351;&#2366;&#2354; &#2340;&#2375; &#2340;&#2337;&#2368;&#2360; &#2344;&#2381;&#2351;&#2366;.
    <br>

    Your generated HTML will be flawed.
    The output of the included JSP is included in the outputstream of the enclosing one.
    Browsers will normally skip any illegal tags when encountered. This included your complete html headers from the included jsp and may (depending on the browser) include all code after the html close tag from that jsp.
    Stricter browsers may simply refuse to display anything at all.
    Read up on what the include mechanism exactly does and on wellformed HTML.

  • Listing files on the webcontent directory that including .jsp files

    Hi ,
    I want to list all files on the directory that including .jsp files . How can I do this ?
    �f I use the following code in the jsp:
    java.io.File file = new java.io.File(".");
    String[] files= file.list();
    it returns me application server 's directory files. But I want to see webcontent directory files.

    You can use the method of ServletContext - getRealPath() to turn a website relative location into a real place on disk.
    In a generic way:
      <%
        String dir = application.getRealPath(request.getServletPath());
        File jspFile = new File(dir);
        File jspDir = jspFile.getParentFile();
        File[] files = jspDir.listFiles(); 
      %>Cheers,
    evnafets

  • I have a problem with the sync between iTunes and ipad2. I can not see the files in iPad. Help me please.

    I have a problem with the sync between iTunes and ipad2. I can not see the files in iPad. Help me please.

    Cannot see what files ? Music (synced music should appear in the iPod app), films/TV shows (Videos app), documents ... ?

Maybe you are looking for

  • GUI Download Issue

    Hi Friends I have to download the text file in the following format. There should be only 3 spaces after number '2' in the first line of text file but I am not able to restrict it and has the entire remaining space(80 char) of that line. second line

  • Problem of acquiring color image

    Now I try to acquire color image but show in grayscale real time with filter it before. The result is so slow on monitor. How can I do to acquire the filter image faster.Any help very appreciated.

  • Validate Settlement Rule for Transaction IW32 / IW31

    Hi All, I want to validate Settlement Rule for trx IW31 and IW32. When someone tries to create Settlement rule for cost center, I have to validate that cost center against some criteria. Do anyone know any BADI or user-exit for this? I tried user-exi

  • Deletion of g/l accounts &vendor and cust.acc.also.

    pl help me to find out the solution

  • Delay after Windows XP loads

    Ok guys I fell alittle better about this board now (although I have 12 days left on my RMA #).  I have the MSI 875P Neo-FIS2R with a Seagate 120GB 8MB cache SATA Hard dive installed on the South Bridge.  When Windows XP Professional is finished loadi