JS file not getting included in JSP

I have a javascript file that I have included in my jsp file, but for some reason it does not get included.
F1/Sort.js and F2/Sort.js are the same file with different color displays in them.
Scenario :
I have a file called Common.jsp, which includes the js file :
if(F1)
<script language="JavaScript" src="scripts/F1/Sort.js"></script>
else
<script language="JavaScript" src="scripts/F2/Sort.js"></script>
The file Common.jsp is included in all other jsp files :
<%@include file="Common.jsp"%>
now, if F1=false, it includes F2/Sort.js, which works perfectly fine
but, if F1=true, it includes F1/Sort.js, which is not working fine.
Sort.js is needed in 3 jsp files, when F2/Sort.js is called, it works fine in all JSPs (S1.jsp,S2.jsp,S3.jsp), but, when F1/Sort.js is included, it works fine in S2.jsp, it displays 'parentNode null or not an object' error in S1.jsp, and does not work in S3.jsp.
Any help is appreciated.
TIA

From your problem description;
"... when F1/Sort.js is included, it works fine in S2.jsp, it displays 'parentNode null or not an object' error in S1.jsp, and does not work in S3.jsp."
Maybe the case is that the file is getting included but it is not functioning due to some problem in the JS.
Is the same "if-else" condition used in all 3 JSPs for including F1/Sort.js ?
You can try putting an alert in both the JS files (outside a JS function) which will show if the file has been included or not.

Similar Messages

  • File not getting deleted using File.delete()

    Hi guys,
    I have a code like this:
    File tempdir = new File("tempdir");
    tempdir.mkdir();
    File temporaryFile = new File("tempdir\tempfile.txt");
    FileWriter writer = new FileWriter(temporaryFile);
    // write data into file
    writer.flush();
    writer.close();
    try {
        // Do something
    catch (Exception e) {
        // Do something
    temporaryFile.delete();
    tempdir.delete();The program runs successfully. The directory and the file is created and data is written successfully into it. However, the file as well as directory is not getting deleted at the end of the program. I tried temporaryFile.deleteOnExit(), but this also didn't help.
    Can anyone provide some input as to what can be the possible reasons for the file not getting deleted?
    Thanks..

    I want the file to be created inside the directory I specified. Hence, I put the "\". Please let me know if there is some other way to achieve this. This way I am getting the file created at the location I want.
    One more interesting thing which I noticed. Actually this code is part of a JUnit test. In the same JUnit, I am creating new files in atleast 2-3 test methods. But the deletion of files is really random. Sometimes, 2 out of 3 get deleted, sometimes only 1 gets deleted. However, I didn't come through a single instance wherein all the 3 files got deleted. :-(
    Also, the directory is never deleted. However, I got the reason behind this. As per the File API, the directory will not be deleted if it is not empty.

  • File not getting picked with Sender Adapter

    Hello Experts,
    i have configured file sender adapter which is polling configured directory every 60 sec. But i could see file not getting picked up. when looked into Communication channel monitoring i could see following error:
    Putting message into send queue failed, due to: com.sap.aii.af.ra.ms.api.DuplicateMessageException : Message ID aa2ec9a0-44b3-11dc-9c5b-0003baa19669(OUTBOUND) already exists in database: com.sap.sql.DuplicateKeyException: ORA-00001: unique constraint (SAPDX1DB.SYS_C00120924) violated.
    is this due to adapter cache. we are on SP20.
    has anybody faced this problem earlier?
    Thanks in advance.
    Regards
    Rajeev

    Hello
    actually there was small problem in file generation and hence it was failing in message mapping which is resolved. but still that problem is there when it is attempting to delete the file. hence it is not able to delete that file.
    can we manually clear the send queues or should we refresh CPA cache?
    Thanks
    Rajeev

  • File not getting picked by File CC

    Hi Experts,
    Q1)An issue in files not getting picked up by communication channel in an inbound scenario  R/3<XI<-File Port
    Retry interval started. Length: 120.0 seconds
    7/24/09 1:33:14 PM   Error occurred while connecting to the FTP server "XXX.XXX.XX.webdti.com:21": java.net.SocketException: Connection timed out:could be due to invalid address
    7/24/09 1:32:00 PM   Processing started
    Any Quick helps highly appreciated.
    Q2)How can i restart an file adapter?
    Thanks,
    Sudhansu

    Hi Sudhanshu,
       Regarding your first question, check if you are able to  access the file port manually typing the ftp address in internet explorer or any browser.
    Regarding your Q2, read this:
    http://help.sap.com/saphelp_nw70/helpdata/en/1b/d5ef3b1ad56d4fe10000000a114084/content.htm
    (CTRL+F for "To restart the adapter")
    Regards,
    Ravi

  • File not found:  includes/common/lib/file_upload/KT_FileUpload.asp Please upload the includes/ folder to the testing server.

    The cooperative I am a part of have a homepage made with Dreamweaver several years ago. Suddenly some of the pages stopped working with this error message:
    File not found: 
    includes/common/lib/file_upload/KT_FileUpload.asp
    Please upload the includes/ folder to the testing server.
    I checked, and the file is actually missing from the web server. Do i need to purchase Dreamweaver to download this file, and is this a path worth pursuing?
    Dreamweaver version: I don't know which or how to check this, could check if given the proper instructions.

    The page that you have shown uses one of the InterAkt extensions for Dreamweaver. Unfortunately, InterAkt was bought out by Adobe who in turn did nothing with it. The latest version was about 5 years ago and was called ADDT.
    Maybe someone here can help you Friends of Interakt: Home Page

  • Modifications to a jsp file not getting loaded after it has been served out once

    Hi,
    I am using Weblogic 6.1 on solaris platform.
    I have created a new managed server under the default domain. A new
    default web application was created with a DefaultWebApp directory which
    acts as the default directory for JSP files for this server.
    problem 1:
    In this new server if i make changes to a jsp file which has been served out
    once, the modifications are not reflected until and unless i restart the
    server.
    problem 2:
    If I start the server and after that I add a JSP file to the DefaultWebApp
    directory, if I try to access it it gives a 404 error which is file not
    found.
    These problems do not occur in the original server which got created when i
    did the installation.
    Can someone help me out please.
    Pankaj

    Hi.
    On reflection I believe this is normal behavior for WLS 6.x. In order to see
    changes to jsps (or other elements in the webapp) you need to either
    undeploy/redeploy the webapp via the console or the command line utility, or you
    can use the refresh utility if your webapp is deployed in the exploded directory
    format (ie not a war file).
    For docs on redeploying and refreshing from the command line see:
    http://e-docs.bea.com/wls/docs61/webapp/deployment.html
    Regards,
    Michael
    Pankaj Bansal wrote:
    yes we installed SP2 for weblogic 6.1....
    the OS is Solaris ver 2.8
    any suggestions on what can i do apart from opening a case with support?
    Pankaj
    "Michael Young" <[email protected]> wrote in message
    news:[email protected]..
    Hi.
    Are you running with service pack 2? If not please try this. If youstill see
    this with sp2 then please open a case with support.
    Thanks,
    Michael
    Pankaj Bansal wrote:
    Hi,
    I am using Weblogic 6.1 on solaris platform.
    I have created a new managed server under the default domain. A new
    default web application was created with a DefaultWebApp directory which
    acts as the default directory for JSP files for this server.
    problem 1:
    In this new server if i make changes to a jsp file which has been served
    out
    once, the modifications are not reflected until and unless i restart the
    server.
    problem 2:
    If I start the server and after that I add a JSP file to theDefaultWebApp
    directory, if I try to access it it gives a 404 error which is file not
    found.
    These problems do not occur in the original server which got createdwhen i
    did the installation.
    Can someone help me out please.
    Pankaj--
    Michael Young
    Developer Relations Engineer
    BEA Support
    Michael Young
    Developer Relations Engineer
    BEA Support

  • Using a real file path to include a JSP using RequestDispatcher

    Hi,
    I am trying to figure out how to use RequestDispatcher inside a servlet to include a jsp page using a real file path instead of a context path. So for example I would want to do something like...
    RequestDispatcher rd = this.getServletContext().getRequestDispatcher("c:/tomcat/conf/think.jsp");
    Is this possible? tomcat is complaining that the path does not start with a "/"
    From a higher level I am trying to setup a solution where all of my web applications can share a set of global jsp pages and other resources. I know the easiest solution would be to put everything into one web application but this does not make sense in my situation because I have differnet web applications for different companies on the same server. Any help would be greatly appreciated. - krebsnet

    First of all...
    My test environment is Tomcat 4.1.24 and it runs on port 80 as my webserver as well.
    I can place the .jsp (or .html) in the shared folder. Not in the lib or class folders but right in the shared folder. I can then call it from multiple contexts without using the context path. Just tested it a minute ago. For example I have test.jsp in the shared folder and loaded it from two separate contexts (one named /demo and one named /inetapps) by calling Load test. It loaded in both of them and neither contain a test.jsp file.

  • Warnings of files not being included in final disc

    I've had a terrible time trying to learn to burn a movie DVD for my kids to play on their TVs/DVDs and was hoping someone here recognizes what I've done wrong. I've created a sequence in Final Cut Pro 5.1.4 (part of FCP Studio 2), used compressor to create the files ending in .ac3 and .m2v (and it also created one ending in .aiff). I imported these into DVD Studio Pro 4 and created a menu with 4 chapters (marked in the timeline). Not sure from the manual if I linked them right or not, but seems that I did. Then when I clicked build/format that worked well (said it was successful). But when I went to burn it I got the following messages in the Build Log.
    Warning: The file ‘IVEY_20022003.layout’ found in the VIDEO_TS or HVDVD_TS folder will not be included in the final disc.
    Warning: The file ‘VOB_DATA.LAY’ found in the VIDEO_TS or HVDVD_TS folder will not be included in the final disc.
    I tried burning this to both a DVD-R and a DVD+R. Both show only the menu screen when I play it on a DVD player, but give the "Not Available" circle with a slash indicator when I tried to play them, use any DVD remote command button, or click on a menu graphic.
    What have I done wrong?
    What other info do you need to know?
    TIA

    The problem is that you have created a HD DVD, not a SD DVD. HD DVDs will not play in stand alone DVD players. You need to delete the VIDEO_TS and HDDVD_TS folders that DVD SP created. Then open up DVD SP and get into the Preferences and change the settings to SD DVD. The bad news is now you have to start all over again and create your project again in DVD SP. You cannot start from your old project.
    The warnings about .layout and .LAY files can be ignored. They are not the problem.

  • PDF File not getting generated - PLEASE HELP

    I have a jsp in a portlet from where in I call another jsp to generate a PDF file on the fly. IT is not working I have tried all sorts of stream please help.
    Calling JSP (Portlet)
    <tr>
    <td><netui:anchor href="print.jsp" target="new">Print
    </netui:anchor>
    </td>
    Called JSP, print.jsp:
    try {
    ServletOutputStream outStream = (ServletOutputStream)response.getOutputStream();
    outStream.write("BINARY OUTPUT".getBytes());
    outStream.println("PRINTLN OUTPUT--"+request.getParameter("empID"));
    outStream.flush();
    outStream.close();
    } catch {}
    As you can see I am just trying to Write some string in the print.jsp
    The word opens up but nothing is WRITTEN in it. Have tried all the OutputStreams. Please help why is it not getting printed even if set proper headers.

    There are some issues with this PDF file.  It's not tagged but even still it has some real problems.  I checked the file to see what created it and it was something called "Wine Postscript Driver" and the PDF Producer was "GPL GhostScript 9.10"  When you check the file in Preflight then you will begin to understand that this is a poorly created PDF file.  Here is a bit of the PDF Syntax report:

  • File Not Found Error running JSP demos

    I'm not sure what is going on, but it appears that every time I try to run a jsp, the server looks in the document root where it errors out with a file not found error. I've seen others with this type of problem but I haven't seen a solution. Anyone have any ideas?
    Thanks.

    1: Double check the port number that your Tomcat Server is using. (TOMCAT_HOME/conf/server.xml).
    2: check you IP. This is not the 'localhost' IP (not sure if it is LAN or real IP). So it may change dynamically.
    3: Check for Firewalls. Also, since you are not using localhost, you will have to make sure you traverse all the firewalls built around your system. If you have a router (home), windows XP, or some other firewall, make sure the appropriate ports are opened. If you are behind a corporate firewall, or your ISP closes ports... your kinda out of luck until you find a way to cheat around them.
    2: Try just using just "/ValidateUser.jsp" as long as it is one the same domain as the Form. This will make it less likely to break, should your IP change.

  • File Not Found Error in JSP

    hi..i m developing one application in JDeveloper...now from html file i am directing to jsp page. using Form tag
    <form action="http://128.127.100.51:8990/ValidateUser.jsp" name="login" method="post"> but it shows me error. "http://128.127.100.51:8990/ValidateUser.jsp" file not found..though html file and ValidateUser.jsp file both are in Public_html file
    Now wht is wrong with this
    Regards
    Chintan

    1: Double check the port number that your Tomcat Server is using. (TOMCAT_HOME/conf/server.xml).
    2: check you IP. This is not the 'localhost' IP (not sure if it is LAN or real IP). So it may change dynamically.
    3: Check for Firewalls. Also, since you are not using localhost, you will have to make sure you traverse all the firewalls built around your system. If you have a router (home), windows XP, or some other firewall, make sure the appropriate ports are opened. If you are behind a corporate firewall, or your ISP closes ports... your kinda out of luck until you find a way to cheat around them.
    2: Try just using just "/ValidateUser.jsp" as long as it is one the same domain as the Form. This will make it less likely to break, should your IP change.

  • File not getting created in a different server

    My requirement.
    I have written a code in the BI system and now need to write an empty file (say a.done)in a directory /interfaces of PI system.
    I wrote using open data set and close data set however the file (a.done) is not getting created in the PI system even though the directory /interfaces exist.
    When I give any directory of that of BI system ,the file(a.done) is getting created i.e the file is getting created on the same server and not on the different server.
    Is there any function module or any other way for the file to get generated in the PI system.
    Please explain with an example.
    Regards,
    Vish

    Try to use  search FTP in se37 or checkout the below FM
    CALL FUNCTION 'EPS_FTP_MPUT'
      EXPORTING
        RFC_DESTINATION            =
    *   FILE_MASK                  = ' '
    *   LOCAL_DIRECTORY            = ' '
    *   REMOTE_DIRECTORY           = ' '
    *   OVERWRITE_MODE             = ' '
    *   TEXT_MODE                  = ' '
    *   TRANSMISSION_MONITOR       = 'X'
    *   RECORDS_PER_TRANSFER       = 10
    *   MONITOR_TITLE              =
    *   MONITOR_TEXT1              =
    *   MONITOR_TEXT2              =
    *   PROGRESS_TEXT              =
    * IMPORTING
    *   LOCAL_DIRECTORY            =
    *   REMOTE_DIRECTORY           =
    *   LOCAL_SYSTEM_INFO          =
    *   REMOTE_SYSTEM_INFO         =
    * TABLES
    *   FILE_LIST                  =
    * EXCEPTIONS
    *   CONNECTION_FAILED          = 1
    *   INVALID_VERSION            = 2
    *   INVALID_ARGUMENTS          = 3
    *   GET_DIR_LIST_FAILED        = 4
    *   FILE_TRANSFER_FAILED       = 5
    *   STOPPED_BY_USER            = 6
    *   OTHERS                     = 7
    IF SY-SUBRC <> 0.
    * Implement suitable error handling here
    ENDIF.

  • File not getting Saved on Application Server

    Hello All,
    We created a file in "Automatic Payment Transactions (F110 Transaction)" and are able to save the text file on Local drive. But for our e-banking requirement we need to store this file on our application server. The configuration settings in OBPM4 are already done and now system is picking the default application server path while saving file in "Payment Medium - > DME Administration" transaction. The problem is - although the system is picking the required path of application server but file is not getting saved. The error coming is: File <path> could not be opened (Message Number: FZ231).
    We have checked for 777 authorisations (OS authorisations) for the folder.
    Please suggest that what can be done to resolve th issue.
    Regards,

    What exactly we need to check in Payment program? We are not able to save the file on application server. There is no problem while saving the same in local drive.
    Regards,

  • File not getting created in Target Directory..........

    Hi All,
               We are trying a IDOC-File scenario & trying to create a XML file on the receiver side........All the mappings have been checked & everything is working fine.It shows success in SXMB_MONI. But the file is not getting created at the target directory..... Checked the component Monitoring and message  monitoring as well, which is also successful...
    What could be the reason of such behaviour, and is there a way to track the where the target file is getting placed?
    Please Help
    Regards,
    Jayashri

    >
    Jayashri Rade wrote:
    > Hi All,
    >            We are trying a IDOC-File scenario & trying to create a XML file on the receiver side........All the mappings have been checked & everything is working fine.It shows success in SXMB_MONI. But the file is not getting created at the target directory..... Checked the component Monitoring and message  monitoring as well, which is also successful...
    i
    Did you check the receiver communication channel in communication channel monitoring?
    Are there any errors?

  • Css file not getting applied to the application

    Hi All,
    I have uploaded a css file and used in my application as
    <link rel="stylesheet" href="#WORKSPACE_IMAGES#default.css" type="text/css"/>
    Previously it was working fine.
    But suddenly, it is not working.
    I am working from a remote server.
    Could anyone please get me a solution for this?
    thanks in advance
    bye
    Srikavi

    Hi joel,
    From this thread
    Shared Files - problems after upgrading APEX 3.0 to 3.1
    i have taken your words,
    In my development of the browser cache support for static files, I did notice some unexplainable behavior with IE and Firefox. When uploading static files and then testing them, it almost seemed like the browser would request the resource only some of the time (and then get the HTTP 304). If an Expires tag is not computed, I know Firefox will compute one itself.
    As per my understanding, Is it cache_expire should be calculated?
    I could not get that line.Could you please explain me.
    Thanks in advance.
    bye
    Srikavi.

Maybe you are looking for

  • Problem to store a oracle sql result into a variable

    Hello everyone, I'm working on a little project that use c#, Oracle ODT and asp.net, so here is the thing, I need to save the result of a sequence (SECNUM.NEXTVAL ) into a variable, then call that value from many inserts and querys and for last make

  • How do i transfer pdf files to my pocket pc?

    How do i transfer pdf files to my Pocket PC? i have adobe reader installed on my phone and ready to go, and the instructions say that to transfer a pdf file to my phone all i need to do is drag it from its location on my computer to the storage card

  • IMac Very Slow  and crashy recently.

    I am no longer able to run apple mail, safari, or iTunes without a freeze or crash. I fixed disk permissions, but it didn't help.

  • Filtering out specific language in mapping

    Hi all, I have an interface IDoc -> PI -> Legacy file system (XML file). There is a string field in source and target messages of the mapping. This field may contain text in English or non-English language. Assume that combination of both will not oc

  • Organizer 8 will not launch after installing Windows 8

    I have PSE 8,0 and it was running just fine. Now I have installed Windows 8 and I can't open the organizer? Is there an explanation of this? Message title was edited by: Brett N