Include file in jsp not working

Hi ,
I have an include file statement in my jsp file which is not working. Not getting any error message either only the page is displayed without the jsp file included.
My include code looks like this :
<%@ include file ="Includes/hello.jsp" %>Also i tried including an html file or an image in the same place neither of the two displayed.
<!--#include virtual="includes/footer.html" -->
My jsp file is hosted on IIS

nb123 wrote:My jsp file is hosted on IIS
Hi ,
I have an include file statement in my jsp file which is not working. Not getting any error message either only the page is displayed without the jsp file included.
My include code looks like this :
<%@ include file ="Includes/hello.jsp" %>Also i tried including an html file or an image in the same place neither of the two displayed.
<!--#include virtual="includes/footer.html" -->
My jsp file is hosted on IIS
Check the path you've specified. It may well be;
<%@include file="hello.jsp" %>or
<%@include file="/Includes/hello.jsp" %>

Similar Messages

  • Hyperlink to file in JSP not working

    I have a JSP page where I am providing a hyperlink to a file on the C: drive as follows
    Try this
    Nothing happens when I click this hyperlink.
    When I scroll over the hyperlink I see the correct path "file:///C:/ReqImport/data.txt" in the status bar and when paste this path in my address bar, it does open up the file.
    Any ideas why this file hyperlink does not work on this JSP page.
    Thanks

    Hmm, you're right, I just tried it and it doesn't appear to work. It looks like a security thing: If the original page is on my hard drive, links to other files on my hard drive work. But when the original page is on a web server, links to files on my hard drive don't appear to work.
    Do you realize that such a link is referring to a file on the C: drive of the client, the user, not the C: drive of the server? I'm not sure what you're up to, but for most applications such a link is pretty much useless, as you normally have no way of knowing what files the user has on his C: drive.

  • Including external Javascript file in JSP- not working on Mozilla Firefox

    I have a JSP page which includes javascript file as below:
    <script type="text/javascript" src="https://siteAddress/scripts/myJsFile.js"></script>
    myJsFile.js has a method testFireFox()
    There is a link on JSP which that calls this method.
    <a href="#" onClick="testFireFox()">Some Text...</a>
    As soon as i click on the link, nothing happens and this error appears on console:
    Refrence Error: testFirefox() is not definedI tried giving the path for JS file in various ways but it did not help.
    Note: This works absolutely fine in Internet Explorer.
    I have not added Javascript to document.ready or onLoad event. It is simply been referred in <Head>
    tag any pointers pls..

    This forum is intended for user support, not for web development issues.
    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The contributors over there are more knowledgeable about web page development issues with Firefox.
    http://forums.mozillazine.org/viewforum.php?f=25
    You'll need to register and login to be able to post in that forum.

  • Error when using %@ include file="/test.jsp"%&

    UsingNitrox version 2.1 M3 (build 419 06022005):
    with jdk version: 1.5.0_03 and Tomcat 5.5.9
    This is the error :cry: when using <%@ include file="/test.jsp"%> in jsp:
    Severity     2
    The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files (test.jsp)
    It used to work in previuos version of Nitrox. I can't use struts tiles because the tiles content is dynamic (run time) and I need it to be static (at compile time).
    Have you encountered this problem? What is the fix? Nitrox bug?
    I need your help please,
    Alberto

    M7,
    I found the problem :wink: . In the java Build path having the default (ALL) is not picking up the content of the package. I had to use add multiple and include all the folders and subfolders (many L) in my packages. After that I added *.java and *.properties to select all the java files. Now it is working. I assume this is a bug in Nitrox. The default ALL should include the all the files in the path.
    Thanks,
    Alberto

  • J2EE Engine startup page error: File [main.jsp] not found in application..

    Hi Guys,
    I have just uninstalled and reinstalled SAP Netweaver 7.01 portal. The uninstall was clean and the reinstall also went without any errors.
    However, immediately after this, when I open http://<host>:<port> I get the following error:
    404   Not Found
    The requested resource /main.jsp is not available
    Details:   File main.jsp not found in application root of alias [/] of J2EE application [sap.com/com.sap.engine.docs.examples].
    If, instead, I open portal (http://<host>:<port>/irj), it works fine.
    Anybody has any idea why this has happened and how can I resolve this issue?
    Thanks,
    Shitij
    Edited by: Shitij Bagga on May 5, 2010 9:36 AM
    Edited by: Shitij Bagga on May 5, 2010 9:37 AM

    Hi Anil,
    I don't see how this note is relevant here. It is just the j2ee engine start page which is not opening. If I go straight to the systeminfo page or the portal login page, they are all working.
    Any experience on this issue with that note u suggested? Please share.
    Thanks,
    Shitij

  • Pls tell me use %@ include file="myfile.jsp"% with endcoding UTF-8??

    My jsp pages use some endcoding as UTF-8.
              When I use <%@ include file="myfile.jsp"%> endcoding lose format UTF-8. But
              if I use <jsp:forward page="myfile.jsp"/> it work fine.
              Pls tell me use <%@include %>
              (I use Jbuilder 6 and weblogic server 6.1)
              Thanks .
              

    From http://java.sun.com/products/jsp/tags/12/syntaxref1214.html#8828 (emphasis mine):
    page="{ relativeURL | <%= expression %> }"
    The relative URL that locates the resource to be included, or an expression that evaluates to a String equivalent to the relative URL.
    The relative URL looks like a pathname--it cannot contain a protocol name, port number, or domain name. The URL can be absolute or relative to the current JSP page. If it is absolute (beginning with a /), the pathname is resolved by your web or application server.
    You could use a servlet in your "path" attribute and have that servlet read and return the page from a different server; there are ways to do what you want, but <jsp:include> isn't one of them.

  • I keep getting the message: "what should firefox do with this file" in Windows XP every time I want to download a file, e.g., adobe, excel, etc. How can this annoying message be deleted? The check box to "open file automatically" does not work!

    I keep getting the message: "what should Firefox do with this file" in Windows XP every time I want to download a file, e.g., adobe, excel, etc. How can this annoying message be deleted? The check box to "open file automatically" does not work!

    cor-el,
    Thanks for your prompt reply. However, the sources you gave do not seem to apply exactly to my situation. I have attached some screenshots that show what the dialogue box looks like for a pdf download, and what my settings in the Apps panel of Options are. You will note in the first screenshot that I have checked the box to handle this file type automatically; however, the next time I try to download a file of that type, the same dialogue box appears looking exactly like the one shown, so checking the "automatic" option appears to do nothing. The files to be downloaded from my Gmail messages are not generic or altered file types - they are shown as pdf, doc, docx, etc. So while your intent was good, your post did not help. Thanks anyway.

  • File conversion is not working

    File conversion is not working.

    Using online services and it simply times out. I login and upload the file
    I want converted and it takes 5 mins or longer and then simply says the
    file conversion failed.
    I got one file to work, but it took like 12 tries.
    Very annoying and it's impossible to call and get a tech person to help.
    On Tuesday, February 11, 2014, PECourtejoie <[email protected]

  • File sharing is not working from pc to imac os x 10.9.2

    file sharing is not working from pc to imac os x 10.9.2

    Hello there Karen,
    It sounds like you are having to power cycle your modem to get internet back every single day. We can start by troubleshooting your Airport Express to help isolate the issue. I would first perform a Soft Reset, then test the issue again. If needed as a last resort I would then perform a Hard Reset:
    Soft reset
    Connect the device to power and wait for it to complete its start up process. To learn more about the start up process, please see All about Wi-Fi base station Status Lights (LED).
    Press and hold the reset button with a pen, pencil, or straightened paperclip for 1 full second, then release it. The light (LED) will begin flashing amber, indicating that the device is in soft reset mode.
    From the AirPort menu bar item, choose the network created by the device (the network name does not change).
    Open AirPort Utility from Applications > Utilities.
    Select the base station, then click Edit (The Edit window will indicate that the base station is in Soft Reset mode).
    Move through the tabs to make changes to your passwords or other settings as needed, and click Update and Continue as required
    Quit AirPort Utility.
    Hard reset
    Press and hold the reset button with a pen, pencil, or straightened paperclip until you see the status light (LED) start to flash amber rapidly, which should occur after about five seconds.
    Release the button and the device will reset.
    Wait about a minute for the base station to finish restarting, then open AirPort Utility from Applications > Utilities.
    Select the base station from Other Wi-Fi Devices, then click Edit.
    Select the Other Options button.
    Select "Restore previous settings" and click Next until you get to the final window.
    AirPort Utility will indicate that Setup is complete. Click Done.
    Quit AirPort Utility.
    Resetting an AirPort base station FAQ
    http://support.apple.com/kb/ht3728
    Thank you for using Apple Support Communities.
    Cheers,
    Sterling

  • File manager still not working w 10.7.3combo

    Since installing lion (I started with 10.7.2) file manager is not working. Yes, I can force uit it and than it does but it is still very annoying and time consumin to do it 2-4 times a day. I was hoping that 10.7.3 will solv it. Than installed based on advice I received hee 10.7.3 compbo but the problem is still there.
    Do you know or have you run accross a thread that explains how to solve it?
    Advanced thats to anyone who can help
    Ruvy

    What is "file manager?"  Is that a piece of third-party software, or are you referring to the Finder?  If it's third-party software, you'll need to contact the developer for an update or fix.  If the Finder is not working (how is it not working?), then you could try some of the tips in Understanding upgrade nightmares.
    (Note that my pages contain links to other pages that promote my services, and this should not be taken as an endorsement of my services by Apple.)

  • The Open URL or File function is not working when I publish as a exe?

    The Open URL or File function is not working when I publish as a exe.  I have tried putting the exe in the same location as the files with no luck.  How do I get the buttons to function properly with a exe file.

    Have you set the Publish folder as a trusted location in Flash Global Security?
    If not, please read this post:
    http://www.infosemantics.com.au/adobe-captivate-troubleshooting/how-to-set-up-flash-global -security
    It may explain your issue.

  • Jsp:include static svg does not work

    I am running tomcat4- and I have a jsp file that outputs svg content like so:
    <?xml version="1.0" encoding="US-ASCII"?>
    <%@ page contentType="image/svg+xml"%>
    This works fine- the problem is that up until now I have included other svg widgets like this:
    <g id="radio_off" >
                   <%@ include file="../graphics/radioButton.svg" %>
              </g>
    which also works just fine. Now, I have to change this to pass in a dynamic directory containing the image (there will be various directories with same file name- I determine at runtime which directory to use)- so I have to use a jsp:include instead.
    When I do this:
    <g id="radio_off" >
    <jsp:include page="graphics/radioButton.svg" flush="true"/>
              </g>
    When it is run I just get:
    g id="radio_off" >
              </g>
    Just blank inside the <g> . If I change radioButton.svg to radioButton.jsp and say:
    g id="radio_off" >
    <jsp:include page="graphics/radioButton.jsp" flush="true"/>
              </g>
    Then I get what I expect with
    g id="radio_off" >
    <svg width="15" height="15">
    ....and so on
              </g>
    I thought jsp:include would include the static content of a file (like html or svg), but apparently only the OUTPUT of that file.....
    Is this correct- I cannot get my svg content to be included in the svg by using jsp:include or am I missing something?
    I think it will be strange that I have to rename all my svg files jsp to get them included...Anu ideas???
    Thanks,
    Jim

    Michael,
    You are right- I reread your post more closely and saw that you are suggesting to basically just map all my static files (like the .svg) into .jsp extensions- which is basically what I was asking was true- that for svg, xml, htm, any static content to be included as in the <%@include directive but using the action <jsp:include it needs to either be changed to the extension .jsp or, as you suggested, mapped in the web.xml to .jsp. I have remapped my svg to .jsp so as to preserve their .svg extensions- (of course now the first user is hit by about 20 jsp:init's on that page!!- but is then cached as in all jsp's).
    I guess kinda makes since since the include action gets the actual response from the page (which is blank image)- but as jsp it is the actual code....Well needed confirmation- and that's what I got along with the reminder to use the mapping in web.xml.
    So thanks alot- even put extra duke in for you !!
    Jim

  • Dynamic include file in JSP page

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

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

  • Help pls ! JSP not working in tomcat

    Hi techies,
    I have a problem in executing jsp files thru tomcat on windows
    The problem is i have my jsp files in a directory, i use virtual directory concept by setting up context in server.xml file to access my jsp, servlets and html files and some jsp files are working properly, but certain jsp files are not working...
    It gives an error saying " jsp file not found.." even though the file is in the directory
    Can anyone help to come-out of this problem.
    Rgds
    sathish

    Hi,
    if you are trying to map a short name to a jsp page, you should do that in the web.xml file not in the server.xml i think...
    Hope this help...

  • Jakarta Commons -- File Upload does not work with Application Server

    Hi ALl,
    I tried Jakarta Commons file upload. In the netbeans, I copied the common jar files "commons-io-1.2.jar" and "commons-fileupload-1.1.1.jar" in the
    netbeans-5.5\enterprise3\apache-tomcat-5.5.17\common\lib and set the class paths. It is working correctly when I compile and run from the netbeans. However, when I deployed in Sun Application Server PE 9.0, I am receiving the following errors. In Sun application I copied the above jars files to "C:\Sun\AppServer\jdk\jre\lib\ext"..
    I have read in several postings that it does not work this way but could find any solution. Any idea will be greatly appreciated.
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:930)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:863)
         org.apache.jsp.fileUpload_jsp._jspService(fileUpload_jsp.java:109)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:353)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:409)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:317)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
         com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
         org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
         com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
         com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
         com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
         com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
         com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
         com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
         com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    root cause
    java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream
         org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:116)
         org.apache.jsp.fileUpload_jsp._jspService(fileUpload_jsp.java:76)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:353)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:409)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:317)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
         com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
         org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
         com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
         com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
         com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
         com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
         com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
         com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
         com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    note The full stack trace of the root cause is available in the Sun Java System Application Server Platform Edition 9.0 logs.
    Sun Java System Application Server Platform Edition 9.0
    Thank you,
    --Sam                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi All,
    I solved this few minutes after I posted this question. Thought I should share with everybody, just in case some one else need it.
    I copied these three files in the folder C:\Sun\AppServer\jdk\jre\lib\ext
    1. servelet-api.jar
    2. commons-io-1.2.jar
    3. commons-fileupload-1.1.1.jar
    No need to set any class path.
    Thanks

Maybe you are looking for

  • How do i put a ringback tone to my iphone,

    how do i set a ringback tone on my iphone

  • Procesess

    Experts:-   in fi business process we can tell ( g/l AR,AP,AA, as the same way we are also tell the client business process) In the same way) WHAT IS THE  PRODUCT COSTING BUSINESS PROCESS, assinge the points for u.

  • Production analysis

    Hi all can anybody send me the fields and tables name for following fields material no.,plan quantity,issue quantity,assembly production quantity,tested quantity. Thanks Anirudh Saini

  • Multiple inbound idoc

    Hi, My scenaroi is Proxy-Soap(Request)-Soap(Response)---IDOC(Multiple IDOC). I am able to do this with one inbound idoc but i am unable to configure multiple inbound idoc with the scenario. My proxy is sending data to soap to intialise request and ge

  • Back up cd

    how do i get my hands on a backup cd for the WRT54G, can anyone tell me