How I can include js (javascript) file in a jsp page?

Hi,
I�ve tried to include a js (javascript) file in jsp file but it doesn�t work.
When I try to use a js function in the browser I always receive an error. Oh, of course, I�m including the correct tag <script src= ...
What can I do? Does the problem in the WebServer?

I cheated and put the scripts in another '.jsp' file and had no problem...then put an include b4 the closing 'head' tag, like this:
<jsp:include page="scrpt.jsp" flush="true" />
I had to do it this way for debugging using JDeveloper (it doesnt seem to like '.js' files). But when the jsp is on the server I used the following line instead:
<script language='JavaScript' src='scrpt.js'></script>
hope this helps.

Similar Messages

  • How to include a .class file in a jsp page

    hi everyone,
    i know the syntax as:
    <%@ include file = "filename.class" %>
    then at run time the server could not find the class file
    if i use,
    <%@ page import = "FileName.class" %>
    then also the same problem persists
    & if i use
    <jsp:include page = "Relative address"/>
    the problem still remains as it is...
    please help me out...i am working on developing an EJB application in which client interacts with server's Stateful session bean through a jsp page...it is necessary for me to include the home interface class file in my jsp page.
    P.S. do not suggest me to include the class file in a package & then use
    <%@ page import = "packageName.ClassFileName" %>
    i
    Edited by: Ankit_JIITU on 6 Jul, 2008 1:55 AM

    Ankit_JIITU wrote:
    i have already included the remote interface class file by <%@ page import = "University.RemoteInterfaceName" %>in my jsp page ...
    if i try to make a new package called test & then include my home interface in that package...i need to import University.*to generate the class file of my home interface ; but the class file generation is not taking place as i am getting the error..
    "package University does not exist".How can i overcome this problem. The package University, which you are trying to import, must be in the classpath. If you removed it then you will have to add it back.
    i have tried my best..but tell me if there's any possible way of including a class file in the jsp page without involving a package.No, there isn't.
    If not,then pls help me to generate the class file of my home interface within a package called test.Read the New To Java Tutorial and understand how packages work.
    >
    i am assuming that u have a deep knowledge of developing EJB applications.

  • Can i cal .fmx file from a JSP Page

    Hi,
    i have Forms Runtime loaded in my System. i able run the .fmx file from Windows Run command. But i want run the fmx file from a link of JSP Page.
    is it possible... plz let me know
    [email protected]

    U can not .
    U can only if you are using an appliction server to run the forms. In this case you can call the URL to run the forms from JSP
    Rajesh ALex

  • How to include a js file in the JSP page

    Hi
    i have included a script tag like the following in the JSP file
    <SCRIPT language="JavaScript">vDateFormat='mm/dd/yyyy';</SCRIPT>
    while deploying i am getting an error 'vDateFormat' unidentified
    Can any one help me

    under view put a new tag
    <f:view>
    <ui:script url="page.js"/>
    and thats it

  • How to Generate a Java file for a JSP Page

    Hi ,
    I am using weblogic11 .
    I am working on a JSP page which nearly consists of 4000 lines of code.
    I need to debug the file , but weblogic server is not generating the java file for the JSP pages .
    Please let me know how can i genertae Java file for the jsp pages ??

    JSPs are compiled into servlets automatically and those classes are stored in WEB-INF/classes folder. Servlet engine handles servlets.

  • How can I include a javaScript files from within jsf component

    Is there any way using which I can include javascript files from my jsf component. Because otherwise I have to write all the javascript commands using writer.write which is very tedious rather than this I just want to include the javascript file which contains all the functions required. Also I want that this file should be included only once irrespective of the number of components included.
    Thanx in advance

    This doesn't depend on JSF. You need to include a script tag, like:
    <script src="/path/script.js"
    language="JavaScript" type="text/javascript"></script>
    If you want to include this only once, make a file included into every page, into which you can put other resources to be included along with this script.
    HTH,
    rs.

  • How I can include several sequences in one sequence file?

    I am new for teststand and forgive me if my question seems silly.
    How I can include several sequences in one sequence file? I would like to use " call sequence" in current file.
    thanks a lot for your kind help

    Hey gunking,
    If you'd like to find out more information about our training courses, I'd be happy to speak with you further about what the course contains and locations offered, but it's probably best if we take this off of the forums for further conversation via phone or email.
    Create a new support request at www.ni.com/contact and set the product as TestStand.  You will be directed to myself or another engineer on my team, at which point you can ask for me or just speak with one of my teammates.
    Off the top of my head, I do know that there are a few courses coming up in Austin in the next couple of weeks (I'm teaching one myself), if you're interested in those.  Otherwise, courses are always being added for the future.
    Derrick S.
    Product Manager
    NI DIAdem
    National Instruments

  • How i can combine multiple pdf files in one file using a macbook air

    how i can combine multiple pdf files in one file

    The application Preview.
    Preview Help.
    Save combined PDFs
    Open the PDFs you want to combine.
    In each open PDF, choose View > Thumbnails to display the pages of the PDF in the sidebar.
    Drag the thumbnails you want to add (Command-click to select noncontiguous pages) to the thumbnail sidebar in the other PDF.You can add pages to the end of the document or between pages in a document. Drag thumbnails to reorder them. You can also add a PDF file before or after another PDF document.
    Choose File > Export to save a new PDF containing all of the combined pages, or choose File > Save to replace the original version of the destination PDF with the version containing the combined pages.

  • Any ideas how I can view this flv file?

    I have CS3 Flash using Flash Player 9 and Actions Script 3.  I am publishing a progressve loading swf, which has an absolute path to an flv of http://www.haleygroup.com/work_images/basics.flv.  The swf file is located here http://www.haleygroup.com/work_images/basics.swf, along withn the html, flv, and skin.  When I click the button (configured by an XML file) on my web site to view the file, I get a flickering box.  Other flvs in the XML file are configured the same way and work fine.  See this flickering box at http://www.haleygroup.com/, enter site and go to "et al" page, then click "Basics".  Any ideas how I can view this flv file?  Many, many thanks.

    I just changed the path to a relative path of just "basics.flv" and still have the problem.  See swf at http://www.haleygroup.com/work_images/basics.swf.  Thanks.

  • How I can create a XML file from java Aplication

    How I can create a XML file from java Aplication
    whith have a the following structure
    <users>
    <user>
    <login>anyName</login>     
    <password>xxxx</password>
    </user>
    </users>
    the password label must be encripted
    accept any suggestion

    Let us assume you have all the data from the jsp form in an java bean object..
    Now you want a xml file. This can be acheived in 2 ways
    1. Write it into a file using java.io classes. Say you have a class with name
    write("<name>"+obj.getName+</name>);
    bingo you have a flat file with the xml
    2. Use data binding to do the trick
    will recommend JiBx and Castor for the 2nd option
    Regards,
    Rajagopal

  • How i can deal with oracle file by using php api

    how I can deal with oracle file by using php api ?

    What has this to do with Reflections and Reference Objects?

  • How I can send pdf document  file in I pad

    How I can send pdf Document file in I Pad

    A simple and popular way to copy files and share files amoung your devices.
    https://www.dropbox.com/
    Using iTures to transfer files:
    http://support.apple.com/kb/HT4094?viewlocale=en_US&locale=en_US
    Files Connect -- The swiss army knife of remote file connect
    https://itunes.apple.com/us/app/files-connect/id404324302?mt=8
    Windows File server
    http://itunes.apple.com/us/app/filebrowser-access-files-on/id364738545?mt=8

  • How to include custom taglib in javascript on a given jsp page

    Hi,
    How to include custom taglib in javascript on a given jsp page?
    i have a jsp page on which i am adding selectboxes using javascript.
    But now i have created my own custom select box and want to add it on a given jsp page.
    is the code to create the box box.
    <sample:pickListOptions employeeId="abcs123"/>
    but how should i embed it in javascript, so that i will be able to add it on the give jsp page.
    Thanks,
    Javaqueue

    when the jsp page is loaded for the first time it contains a select box containg names created by a taglib.but there is a feature i want to add wherein though javascript the name selectebox will keep on coming on each row i want to add. and this is row addition and deletion is being handled by the javascript. there i encounter the bug how to interact the javascript with taglib so tha with each row addition i will have populated taglib created select box on each row.
    Thanks,
    Javaqueue

  • How can I access JSP variables from a JavaScript function in a JSP page?

    Respected sir
    How can I access JSP variables from a JavaScript function in a JSP page?
    Thanx

    You may be get some help from the code below.
    <%
        String str="str";
    %>
    <script>
        function accessVar(){
           var varStr='<%=str%>';
           alert(varStr);// here will diplay 'str'
    </script>

  • How we can create the batch file to download the data in from URL in ssis

    hi,
    any one help on one the below requirement.
    i have to create one batch file to download the report(reports is in csv format) from URL...
    requirement should be like this...
    1. we have some reports is there in the URL..
    2.when ever we execute the url, the report should be download and save it to the local folder.
    3. this requirement i have to write in the batch file
    should any one let me know how we can create the batch file for the above requirement.

    Hi Priya.N,
    If you use SQL Server Reporting Services for reporting, you can use Visakh’s suggestion to create a script file which calls Reporting Services Web Service to render a report in CSV format and save a batch file to the destination folder, and then create a
    batch file to run the rs.exe utility which can executes the .rss script file. For more information, please see:
    Report Server Web Service
    ReportExecutionService.Render Method
    rs Utility (rs.exe) (SSRS)
    If you use other reporting tools, it depends on the reporting functionality and this requirement may be not achieved.
    Regards,
    Mike Yin
    TechNet Community Support

Maybe you are looking for

  • HT1349 iTunes and Windows 8 will not work!!! Please help!!!

    I just purchased a new sony vaio laptop computer with Window's 8 and I have uninstalled and installed itunes over 5 times and it will not work. When attempting to open it, a box pops up that says "ITunes has stopped working: A problems caused the pro

  • What size external hard drive should I purchase

    What size external hard drive should I purchase?  I'm not tech savvy, so please speak slowly.  I'm looking at OWC Mini Stack Classic to match my  older Mac Mini.  Do I need 500 GB, 1 TB or more?      Plus, I have to add memory to upgrade to Snow Leop

  • J_security_check 404 error Please please help me

    I am new to this forum although I have been lurking around for while:) I have a question about j_security_check. I am working in Apache Tomcat server and I want to set up form based authentication. So I used j_security_check and I get an error 404 j_

  • How do I rotate movies in iphoto 11?

    how do I rotate a movie clip in iphoto 11?

  • ITunes connection reset for all purchased content - won't download!

    Hello, I see many archived messages about this issue, however, it is a new problem for me.  I have until now been able to download entire Seasons of shows without an issue, without interruption.  Now, a single half-hour episode in standard definition