error with JSP directive


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: error with JSP directive

  1. #1
    satish Guest

    error with JSP directive



    I coded a simple .jsp file with three input fileds.....it compiled well and
    is executing well on the server,

    but then for the same....file if i add just one tag....i.e

    <%@ page language="java" %>

    it is not running and is throwing a pagedirective exception, what could be
    the problem, pls let me know..

    satish

    ( this is excuting perfectly) but.........

    --------------------------------------------------------

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
    <html>
    <HEAD>
    <META name="GENERATOR" content="IBM WebSphere Page Designer V3.0.2 for Windows">
    <META http-equiv="Content-Style-Type" content="text/css">
    </HEAD>
    <BODY bgcolor="#669999"><H2> THE USER INPUT SCREEN </H2>
    <Form method = "post" action ="http://pc27/datahandler.jsp" >
    <table>
    <tr>
    <td>Enter Your NAME </td><td><input type="text" name="NAME" value=""></td>
    </tr>
    <tr>
    <td>Enter Your ADDRESS </td><td><input type="text" name="ADDRESS" value=""></td>
    </tr>
    <tr>
    <td>Enter Your PHONE </td><td><input type="text" name="PHONE" value=""></td>
    </tr>
    <tr>
    <td>Enter Your EMAIL </td><td><input type="text" name="EMAIL" value=""></td>
    </tr>
    <tr>
    <td><input type="submit" name="submit" value="Register"></td>
    </tr>
    </table>
    </form>
    </BODY>
    </html>

    -------------------------------------------------------------------------------------------

    this is not excecuting....


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
    <html>

    <% @ page language="java" %> ( NOT EXECUTING)...................................................PLS
    CHECK
    <HEAD>
    <META name="GENERATOR" content="IBM WebSphere Page Designer V3.0.2 for Windows">
    <META http-equiv="Content-Style-Type" content="text/css">
    </HEAD>
    <BODY bgcolor="#669999"><H2> THE USER INPUT SCREEN </H2>
    <Form method = "post" action ="http://pc27/datahandler.jsp" >
    <table>
    <tr>
    <td>Enter Your NAME </td><td><input type="text" name="NAME" value=""></td>
    </tr>
    <tr>
    <td>Enter Your ADDRESS </td><td><input type="text" name="ADDRESS" value=""></td>
    </tr>
    <tr>
    <td>Enter Your PHONE </td><td><input type="text" name="PHONE" value=""></td>
    </tr>
    <tr>
    <td>Enter Your EMAIL </td><td><input type="text" name="EMAIL" value=""></td>
    </tr>
    <tr>
    <td><input type="submit" name="submit" value="Register"></td>
    </tr>
    </table>
    </form>
    </BODY>
    </html>



  2. #2
    sudhakar Guest

    Re: error with JSP directive


    Hi satish,

    in ur come there is a space between % and @ remove it

    ur jsp file will execute properly.

    your directive should be like

    <%@ page language="java" %>


    bye
    sudhakar.






    "satish" <satish_141@yahoo.com> wrote:
    >
    >
    >I coded a simple .jsp file with three input fileds.....it compiled well

    and
    >is executing well on the server,
    >
    >but then for the same....file if i add just one tag....i.e
    >
    ><%@ page language="java" %>
    >
    >it is not running and is throwing a pagedirective exception, what could

    be
    >the problem, pls let me know..
    >
    >satish
    >
    >( this is excuting perfectly) but.........
    >
    >--------------------------------------------------------
    >
    ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
    ><html>
    ><HEAD>
    ><META name="GENERATOR" content="IBM WebSphere Page Designer V3.0.2 for Windows">
    ><META http-equiv="Content-Style-Type" content="text/css">
    ></HEAD>
    ><BODY bgcolor="#669999"><H2> THE USER INPUT SCREEN </H2>
    ><Form method = "post" action ="http://pc27/datahandler.jsp" >
    ><table>
    ><tr>
    ><td>Enter Your NAME </td><td><input type="text" name="NAME" value=""></td>
    ></tr>
    ><tr>
    ><td>Enter Your ADDRESS </td><td><input type="text" name="ADDRESS" value=""></td>
    ></tr>
    ><tr>
    ><td>Enter Your PHONE </td><td><input type="text" name="PHONE" value=""></td>
    ></tr>
    ><tr>
    ><td>Enter Your EMAIL </td><td><input type="text" name="EMAIL" value=""></td>
    ></tr>
    ><tr>
    ><td><input type="submit" name="submit" value="Register"></td>
    ></tr>
    ></table>
    ></form>
    ></BODY>
    ></html>
    >
    >-------------------------------------------------------------------------------------------
    >
    >this is not excecuting....
    >
    >
    ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
    ><html>
    >
    ><% @ page language="java" %> ( NOT EXECUTING)...................................................PLS
    >CHECK
    ><HEAD>
    ><META name="GENERATOR" content="IBM WebSphere Page Designer V3.0.2 for Windows">
    ><META http-equiv="Content-Style-Type" content="text/css">
    ></HEAD>
    ><BODY bgcolor="#669999"><H2> THE USER INPUT SCREEN </H2>
    ><Form method = "post" action ="http://pc27/datahandler.jsp" >
    ><table>
    ><tr>
    ><td>Enter Your NAME </td><td><input type="text" name="NAME" value=""></td>
    ></tr>
    ><tr>
    ><td>Enter Your ADDRESS </td><td><input type="text" name="ADDRESS" value=""></td>
    ></tr>
    ><tr>
    ><td>Enter Your PHONE </td><td><input type="text" name="PHONE" value=""></td>
    ></tr>
    ><tr>
    ><td>Enter Your EMAIL </td><td><input type="text" name="EMAIL" value=""></td>
    ></tr>
    ><tr>
    ><td><input type="submit" name="submit" value="Register"></td>
    ></tr>
    ></table>
    ></form>
    ></BODY>
    ></html>
    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center