problem in loading a js file through jsp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SagarDoke
    New Member
    • Feb 2008
    • 24

    problem in loading a js file through jsp

    Hello,

    this is my servlet:

    [CODE=java]String skill_id = request.getPara meter("skill_id ");

    request.setAttr ibute("Skill_id ", skill_id);

    RequestDispatch er rd = request.getRequ estDispatcher(" TerminationSele ction.jsp");

    rd.forward(requ est,response);
    [/CODE]
    from here i'm calling jsp page, with parameter Skill_id.

    i'm executing this servlet by following url:



    Now, following is my jsp code, from where i am trying to execute js file. but, i'm not getting result, there is no any out showing on browser. blank page is there.



    [HTML]<html>
    <head>
    <%
    String skill_id = request.getAttr ibute("Skill_id ").toString ();
    %>
    <title>Terminat ion Code Management</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link rel="Project Icon" href="resources/icon.ico" />
    <link rel="stylesheet " type="text/css" href="resources/css/ext-all.css"/>
    <link rel="stylesheet " type="text/css" href="resources/css/xtheme-slate.css"/>
    <script type="text/javascript" src="ext-base.js"></script>
    <script type="text/javascript" src="ext-all.js"></script>
    </head>
    <body>
    <script type="text/javascript" src="Terminatio nSelection.js"> </script>
    <div id="termcodecat "></div>
    </body>
    </html>
    [/HTML]
    i'm getting the value of skill_id in jsp, but not output.
    Is there any problem in code or this is not possible that executing javascript code through servlet.
    Last edited by acoder; Mar 14 '08, 12:33 PM. Reason: Added code tags
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Originally posted by SagarDoke
    Now, following is my jsp code, from where i am trying to execute js file. but, i'm not getting result, there is no any out showing on browser. blank page is there.
    i'm getting the value of skill_id in jsp, but not output.
    Is there any problem in code or this is not possible that executing javascript code through servlet.
    Well, if you don't output anything, there'll be nothing displayed on the page.

    Does the JavaScript code contain any document.write( ) statements?

    Comment

    Working...