Where to add directive on a JSP page?

Do we have t o add a directive like an import packages directive, on the top of the JSP page ONLY. Or can we place it anywhere in the file ...may be just above when you have the java code.
Example:
Should I place:
<%@ page import = "java.util.*, java.lang.*,java.text.* " %>right above my <html> tag or can I place it inside my <body> wher eI have some code Example:
String i="123";
int k= Integer.parseint(i);Will that change the way the JSP works?
I know that compiling is done top to bottom, but how does it effect the performance?
Are all directives loaded initially, when the program is run?
Thanks,
Kishore

It's good to add it on top of the file. But for your code to work, you are required to add directive at least before you write any java code in your jsp file.

Similar Messages

  • How do create a multi select that is one directional in a jsp page

    i am trying to create a one directional multi select in jsp that is when select the option from the multi- select the first time is not appear again that is for instance if i have a status option of
    NEW
    Fix
    Closed
    they should come from the database from and if they have been selected once and save in another table they should not appear again... that is is you selec Fix you cannot go back to New... how can I accomplish that in jsp
    my default is coming from on table and the rest from another reference table with for all the drop downs.

    Thanks.  I sorted it out after a while.  The problem that I was having is that Pages seemed to treat the copied and pasted webpage content almost like an image: indivisible.  I had to go back to the page and copy a few pages at a time.  Then I could paste the content in one page after another.

  • How to add JPanel,JFrame to JSP Page so that it does'nt popup

    i have added a JPanel jp1
    which is as follows
    <%JPanel jp1 = new JPanel();%>
    i am getting a error in the page in webbrowser
    javax.swing.JPanel[,0,0,0x0,invalid,layout=java.awt.FlowLayout,alignmentX=null,alignmentY=null,border=,flags=9,maximumSize=,minimumSize=,preferredSize=]
    also i have added a frame as follows
    <%adminlog adllogz = new adminlog();%>
    <%adllogz.setVisible(true);%>
    so these two lines of code make a poop up window of adminlog
    from a webbrowser
    what i want is that these two lines of code should not do
    a pop up but come inside a webbrowserPlease tell asap

    The problem is that you used position:absolute, my post talked about using position:fixed.
    Also your image does not need to be inside the adBox, just use adImage by itself with this CSS:
    #adImage{
    background-color: #FF0000;
    position:fixed;
    bottom:0px;
    right:0px;
    width:100px;
    height: 100px;
    will fix adImage to bottom right 0 px from the edge of window. If you want a little separation, just change
    bottom:0px;
    right:0px;
    to 5 or 10 px or so.
    No jQuery needed.
    Best wishes,
    Adninjastrator

  • French characters in a JSP page

    I have an HTML page with a form that has a text field that can accept text from the user. This text can be multilanguage and when French charcters are in the text field, when the user submits the HTML form, my JSP that retrieves the text from the text field is not encoding the characters properly.
    For example, this line:
    �nonc� sur la sant�, la s�curit� et le milieu de travail
    Into a String object in my JSP page as this:
    �?nonc�� sur la sant��, la s��curit�� et le milieu de travail
    This is no doubt an encoding problem but I am not sure hot to fix it.
    Anyone have any recommendations?

    That indeed helped.
    I had this page directive in the JSP page that contained the form:
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>But I needed to add this line to the JSP page that the form was being posted to:
    request.setCharacterEncoding( "UTF-8" );

  • How do I render Math expressions in my JSP pages?

    Hi,
    I am sort of a beginner using JSF. I am currently working on a project, where I need to render Math expressions such as fractions, square-roots, power-functions etc.
    The problem is, that currently all I am able to do is to use the standard text operators such as '/', '^' etc. I would like to have 'real' math expressions rendered.
    Does anyone know how to do this easiest? Is there any tag-libs available for doing so?
    I realize it is doable using HTML, but because of the design of my application, it is not an option to insert HTML directly into the JSP pages.
    Thanks in advance :)
    Best Regards
    Thomas

    Thank you for the quick answer!
    My problem is not to do the math, my problem is how to display the math on the JSP page. I want to display fractions, power-functions, square roots with the actual mathmatical symbols, not the symbols mentioned above (/, ^, sqrt, etc.).
    Does anyone know how to do this, or if there exists any taglibs?

  • Error in jsp page

    1.i create a database
    2.then i create a jsp page for welcome
    3.then another jsp page for view result
    4.then i write code for java
    here is my 1st jsp page
    <html>
    <head>
    <title>login</title>
    </head>
    <body bgcolor=pink>
    <form action="project.jsp" method=post>
    Project id
                      &nbsp
    ; <input type="text" name="proj_id"><br><br>
    Project Name                <input
    type="text" name="proj_name"><br><br>
    Client Name
                     <input
    type="text" name="client_name"><br><br>
    Project Start Date          <input type="text" name="strt_date"><br><br>
    Est Project End Date     <input type="text" name="est_date"><br><br>
    Project Manager            <input type="text"
    name="proj_mgr"><br><br>
    Est Effort
                      &nbsp
    ;   <input type="text" name="est_effort"><br><br>
    <input type="submit" name="add" value="Add" onClick=add() >
    <input type="button" name="modify" value="Modify">
    <input type="button" name="delete" value="Delete">
    <input type="button" name="assign" value="Assign">
    </form>
    </body>
    </html>
    here my java page
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.*;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.io.*;
    class base
         PreparedStatement pstmt=null;
         Connection con = null;
         Statement stmt = null;
         ResultSet rset = null;     
          int est_effort;
         String  proj_id,proj_name,client_name,strt_date,est_date,proj_mgr; 
    /*     int est_effort;
         String  Project_id,Project_name,client_name,start_date,estimated_date,Project_mgr;   */
         void add( )
              try
                   String driverName = "com.mysql.jdbc.Driver";
                   Class.forName(driverName);
                   String serverName = "192.168.10.5";
                   String mydatabase = "Trainees";
                   String url = "jdbc:mysql://" + serverName +  "/" + mydatabase; // a JDBC url
                   String username = "josep";
                   String password = "josep";
                   con = DriverManager.getConnection(url, username, password);
                   System.out.println("Connected");
              catch(Exception e)
                   System.err.println("Exception: " + e.getMessage());
              try{
                   System.out.println("Before Update1");     
    pstmt=con.prepareStatement("insert into project(proj_id,proj_name,client_name,strt_date,est_date,proj_mgr,est_effort) values  ('
    "+Project_id+" ',' "+Project_name+"',' "+client_name+" ',' "+start_date+" ',' "+estimated_date+" ',' "+Project_mgr+" ',' "+est_effort+"')");
    pstmt=con.prepareStatement("insert into project(proj_id,proj_name,client_name,strt_date,est_date,proj_mgr,est_effort) values 
                   System.out.println("Before Update2");
                   pstmt.setString(1,proj_id);
                   pstmt.setString (2,proj_name);
                   pstmt.setString (3,client_name);
                   pstmt.setString (4,strt_date);
                   pstmt.setString (5,est_date);
                   pstmt.setString(6,proj_mgr);
                   pstmt.setInt(7,est_effort);
                          pstmt.executeUpdate();
                   System.out.println("" +pstmt );
              catch(Exception e)
                   System.err.println("Exception: " + e.getMessage());
              finally
                   try
                        if(con != null)
                             con.close();
                   catch(SQLException e)
         void modify()
         void delete()
         void assign()
    public class xx extends base
         public static void main(String args[]) throws IOException
              base a= new base();
              a.add();
    here my second jsp page
    <%@ page language="java"%>
    <%@ page import="java.io.*" %>
    <%@ page import="java.sql.*"%>
    <%@page import="ss.xx"%>
    //<%@ page import="ss.xx.*"%>
    <html>
    <head><title>Welcome</title></head>
    <body bgcolor = "LightGrey">
    Welcome...
    <br>
    <%
    xx obj=new xx();
    obj.add( );
    %>
    <%
         String Project_id = request.getParameter("proj_id");
    String Project_name=request.getParameter("proj_name");
    String client_name=request.getParameter("client_name");
         String start_date=request.getParameter("strt_date");
         String estimated_date=request.getParameter("est_date");
         String Project_mgr=request.getParameter("proj_mgr");
         int est_effort=Integer.parseInt(request.getParameter("est_effort"));
    %>
    <p><font size="6">Project id :  <%= Project_id%></font></p>
    <p><font size="6">Project Name :  <%= Project_name%></font></p>
    <p><font size="6">Client Name :  <%= client_name%></font></p>
    <p><font size="6">Project Start Date :  <%= start_date%></font></p>
    <p><font size="6">Est Project End Date :  <%= estimated_date%></font></p>
    <p><font size="6">Project Manager :  <%= Project_mgr%></font></p>
    <p><font size="6">Est Effort :  <%= est_effort%></font></p>
    </body>
    </html>
    here that second jsp page error
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 12 in the jsp file: /project.jsp
    Generated servlet error:
    The type base cannot be resolved. It is indirectly referenced from required .class files
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:409)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    Uh, those aren't runtime errors, but just compilation errors. Googling on the error message can give a lot of results.
    Learn how to write Java properly. It would also help a lot if you put all the Java logic in Java classes instead of JSPs.

  • Displaying an Integer in a JSP page

    Hi, i have a small problem which i'm not sure how to solve.
    I'm developing a small application in Spring/Hibernate. Now, one of the classes i mapped to a table has some fields which are of Integer type. My problem is that when i try to display these fields directly in a JSP page i get a NumberFormatException. Is there any tag that knows how to "extract" the intValue() from an Integer and display in in a JSP without me having to resort to custom getters?

    A NumberFormatException would occur if the to-be-formatted value is actually not a numeric. But you're saying that it is an Integer. Aren't you storing it as String? How exactly are you displaying it in JSP and how exactly are you storing the value?

  • How add gadget to my jsp

    hi all
    please help me how to add gadget to my jsp page,

    double post:
    http://forum.java.sun.com/thread.jspa?threadID=5180404&messageID=9701170#9701170
    You are not going to get anywhere with these vague questions.

  • How to add a frame dynamically in a jsp page.

    Hai all,
    In my application, in a particular jsp page i had the 3 links namely add.edit and delete. When click on add button, it is pointing to another jsp page where i can enter user details. But what i want now is when i click add button, the form in which we fill the user details should be added to the current page itself dynamically i.e., it should not go to another page when i click add button and that form should be displayed in the current page in a new frame dynamically.
    The same should happen when i click n edit or delete options. everything should be diaplayed in the same page in different frames.
    Can anyone suggest me about how to add a frame dynamically.

    You create a frameset with two frames. One frame you give 100% of the rows and run the JSP in this frame. The other frame you give 0% of the row so that it is hidden. In the JSP you use a JavaScript funtion to submit the form. This function will call the parent frameset to reset the row values to 50%/50% which will make the bottom frame visible and then submit the form request with the bottom frame as teh target.
    It is not so much as creating frames as using JavaScript to hide and display frames.

  • How to add or remove data from one table to another in � jsp page

    I have two tables on my jsp page.
    On the fist table feed by a data base, u have in the first column radiobutton
    second colum data
    third columm data
    on the second table feed by the data of the first table, u have in the first
    columm checkbox
    second colum data
    this column data
    u have two link, one link to add and another to remove
    1 when u click one of the radiobutton of the fist table following by the click of the link add, u add the line into the second table.
    2 when u click on one or two checkboxes of the second table following by a click on the link remove, u remove the line or lines checked.
    Did somebody could send to me en example of code and give to me solution on way to make it. thank u.

    rather than sending you the whole code, i would like
    to see your code first, how far you implemented the
    code ? and where are you getting problem, asking the
    code like this is not a professional.
    All the Best !******************************************************************************************************************************
    that's what i have implements. U have a bean witch picked data in that the data base, and catch properties .
    i describe to u how work the page.
    when u chose or selected TypeDetoyer, it present to u the first table with all the toyer contains in the typeDeToyer, and presents the second table empty.
    Secondly, u click a radio button to select � toyer of typeDeToyer and by clicking to the link ada, u feed the second table with the toyer selected.
    the seconde table is fill with a checkbox.
    inverse, when u check a check box or many of the second table and clicking on the link remove, u remove the selected lines.
    the aim of all of this is to save in the data base
    the second table, after saving the page is redirect to the modifying form.
    I am waiting for ur answer.
    Coul u send to me how u implements the part beetween the two tables
    Thank s
    <%@ page language="java" import="java.util.*"%>
    <jsp:useBean id="nsimalenBean" scope="session" class="nsimalen.NsimalenBean" />
    <jsp:useBean id="toyerBean" scope="session" class="nsimalen.ToyerBean" />
    <jsp:useBean id="vectorLstTasks" scope="session" class="java.util.Vector" />
    <jsp:useBean id="hashtableToyerSelected" scope="session" class="java.util.Hashtable"/>
    <jsp:useBean id="hashtableRegimeFiscalToyers" scope="session" class="java.util.Hashtable"/>
    <%
    //nsimalen.NsimalenBean nsimalenBean=nsimalenBean();
    ///vectorLstTasks.removeElementAt(i);
    String cVide="";
    String typeOperation;
    String monCodeNsimalen;
    //String monCodeNsimalen=request.getParameter("txtCreateNsimalenFormCode");
    String monNomNsimalen;
    String maVilleNsimalen;
    String monPaysNsimalen;
    String monTypeDetoyerSelected;
    String codeToyerSelected;
    String codeToyerSelectedToAdd;
    String codeToyerSelectedToRemove;
    String currentlibelleTypeDetoyer=cVide;
    String typeAction;
    /// d�finition de variable dont les valeurs seront stock�es dans l'objet de session
    if(request.getParameter("txtCreateNsimalenFormCode")!=null)
    monCodeNsimalen=request.getParameter("txtCreateNsimalenFormCode");
    else
    monCodeNsimalen=cVide;
    if(request.getParameter("txtCreateNsimalenFormNom")!=null)
    monNomNsimalen=request.getParameter("txtCreateNsimalenFormNom");
    else
    monNomNsimalen=cVide;
    if(request.getParameter("txtCreateNsimalenFormVille")!=null)
    maVilleNsimalen=request.getParameter("txtCreateNsimalenFormVille");
    else
    maVilleNsimalen=cVide;
    if(request.getParameter("selCreateNsimalenFormPays")!=null)
    monPaysNsimalen=request.getParameter("selCreateNsimalenFormPays");
    else
    monPaysNsimalen=cVide;
    if(request.getParameter("optCreateNsimalenFormTypeToyer")!=null)
    {monTypeDetoyerSelected=request.getParameter("optCreateNsimalenFormTypeToyer");
    currentlibelleTypeDetoyer=toyerBean.getLibelleTypedeToyer(monTypeDetoyerSelected);
    else
    monTypeDetoyerSelected=cVide;
    if(request.getParameter("radioCreateNsimalenFormCodeToyers")!=null)
    codeToyerSelectedToAdd=request.getParameter("radioCreateNsimalenFormCodeToyers");
    else
    codeToyerSelectedToAdd=cVide;
    if(request.getParameter("radioCreateNsimalenFormCodeToyersRemove")!=null)
    codeToyerSelectedToRemove=request.getParameter("radioCreateNsimalenFormCodeToyersRemove");
    else
    codeToyerSelectedToRemove=cVide;
    if(request.getParameter("typeOperation")!=null)
    typeOperation=request.getParameter("typeOperation");
    else
    typeOperation=cVide;
    if(request.getParameter("typeAction")!=null)
    typeAction=request.getParameter("typeAction");
    else
    typeAction=cVide;
    // Stockage des valeurs dans l'objet
    nsimalenBean.setCodePays(monPaysNsimalen);
    nsimalenBean.setNomNsimalen(monNomNsimalen);
    nsimalenBean.setVilleNsimalen(maVilleNsimalen);
    nsimalenBean.setCodeNsimalen(monCodeNsimalen);
    nsimalenBean.setDateCreation("12/12/2001");
    // if typeOperation=Invalidation
    // nsimalenBean.setDatad'invalidation
    if(typeAction.equals("Save"))
    nsimalenBean.validationCreation();
    Vector validationErrors= nsimalenBean.getChampVide();
    %>
    <body>
    <%
    if (validationErrors!=null && validationErrors.size()!=0 )
    for (int i=0; i<validationErrors.size();i++)
    %>
    <BR> Champs Invalides : <%=(String)validationErrors.elementAt(i)%>; <BR>
    <%
    else
    if (hashtableToyerSelected!=null && hashtableToyerSelected.size()<=10)
    nsimalenBean.insertRowNsimalen();
    nsimalenBean.insertRowsToyersAssocieesNsimalen(hashtableToyerSelected);
    if (hashtableToyerSelected!=null && hashtableToyerSelected.size()>=0)
    %>
    <BR> num Toyers max 10 <BR>
    <%
    if (hashtableToyerSelected!=null && hashtableToyerSelected.size()==0)
    %>
    <BR> vous devez au moins selectionner une toyer pour un nsimalen <BR>
    <%
    %>
    <form method="post" name="CreateNsimalenForm" action="CreateNsimalen.jsp">
              <table cool width="681" height="424" usegridx usegridy showgridx showgridy gridx="16" gridy="16" border="0" cellpadding="0" cellspacing="0">
                   <tr height="16">
                        <td width="16" height="423" rowspan="11"></td>
                        <td width="288" height="16" colspan="3"></td>
                        <td width="376" height="144" colspan="3" rowspan="5"></td>
                        <td width="1" height="16"><spacer type="block" width="1" height="16"></td>
                   </tr>
                   <tr height="32">
                        <td width="100" height="32" valign="top" align="left" xpos="16"><label><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><b>Code :</b></font></label></td>
                        <td width="188" height="32" colspan="2" valign="top" align="left" xpos="116"><input type="text" name="txtCreateNsimalenFormCode" size="24" value='<%=nsimalenBean.getCodeNsimalen()%>'></td>
                        <td width="1" height="32"><spacer type="block" width="1" height="32"></td>
                   </tr>
                   <tr height="32">
                        <td width="100" height="32" valign="top" align="left" xpos="16"><label><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Nom :</b></font></label></td>
                        <td width="188" height="32" colspan="2" valign="top" align="left" xpos="116"><input type="text" name="txtCreateNsimalenFormNom" size="24" value='<%=nsimalenBean.getNomNsimalen()%>'></td>
                        <td width="1" height="32"><spacer type="block" width="1" height="32"></td>
                   </tr>
    <input type="hidden" name="typeOperation" size="24" >
    <input type="hidden" name="typeAction" size="24" >
                   <tr height="32">
                        <td width="100" height="32" valign="top" align="left" xpos="16"><label><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Ville :</b></font></label></td>
                        <td width="188" height="32" colspan="2" valign="top" align="left" xpos="116"><input type="text" name="txtCreateNsimalenFormVille" size="24" value='<%=nsimalenBean.getNomVille()%>'></td>
                        <td width="1" height="32"><spacer type="block" width="1" height="32"></td>
                   </tr>
                   <tr height="32">
                        <td width="100" height="32" valign="top" align="left" xpos="16"><label><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Pays : </b></font></label></td>
                        <td width="188" height="32" colspan="2" valign="top" align="left" xpos="116"><select name="selCreateNsimalenFormPays" size="1">
    <option value="" ><b><font size="2" name="optCreateNsimalenFormPays"></font></b></option>
    <%
    //String cVide="";
    Vector nsimalenLst = new Vector();
    //strNomNsimalen=request.getParameter("txtSearchFormNom").trim();
    nsimalenLst = nsimalenBean.getAllPays();
    // Pour savoir la taille du vecteur
    if(nsimalenLst!=null && nsimalenLst.size()!=0)
    for(int i=0;i< nsimalenLst.size();i++)
    Hashtable myrecord = (Hashtable)nsimalenLst.elementAt(i);
    String monCodePays ="";
    String monLibelle="";
    monCodePays =(String)myrecord.get("NNAM_CODE");
    monLibelle =(String)myrecord.get("NNAM_LIBELLE");
    System.out.println("mon code pays= "+monCodePays+"i="+i+ " mon Libelle Pays="+monLibelle+"nsimalenLst.size() ="+nsimalenLst.size());
    %>
    <option value='<%=monCodePays%>' <%if(monCodePays.equals(monPaysNsimalen))
    out.print("selected");%> ><b><font name="optCreateNsimalenFormPays" size="2"><%=monCodePays%></font></b></option>
                             <%}
    %>
    </select></td>
                        <td width="1" height="32"><spacer type="block" width="1" height="32"></td>
                   </tr>
                   <tr height="16">
                        <td width="664" height="16" colspan="6" valign="top" align="left" xpos="16">
                             <hr width="644" size="2">
                        </td>
                        <td width="1" height="16"><spacer type="block" width="1" height="16"></td>
                   </tr>
                   <tr height="32">
                        <td width="100" height="32" valign="top" align="left" xpos="16"><label><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Type de toyer :</b></font></label></td>
                        <td width="32" height="32"></td>
                        <td width="156" height="32" valign="top" align="left" xpos="148"><select name="optCreateNsimalenFormTypeToyer" size="1" onChange="javascript:document.CreateNsimalenForm.submit();">
    <option value="" ><b><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"></font></b></option>
    <%
    //String cVide="";
    Vector toyerLst = new Vector();
    //strNomNsimalen=request.getParameter("txtSearchFormNom").trim();
    toyerLst = toyerBean.getAllTypeDeToyers();
    // Pour savoir la taille du vecteur
    if(toyerLst!=null && toyerLst.size()!=0)
    hashtableRegimeFiscalToyers = new Hashtable();
    for(int i=0;i< toyerLst.size();i++)
    Hashtable myrecord = (Hashtable)toyerLst.elementAt(i);
    String monTypeToyer ="";
    String monLibelleToyer="";
    monTypeToyer =(String)myrecord.get("TTOY_CODE");
    monLibelleToyer =(String)myrecord.get("TTOY_LIBELLE");
    // System.out.println("mon code pays= "+monTypeToyer+"i="+i+ " mon Libelle Pays="+monLibelleToyer+"nsimalenLst.size() ="+toyerLst.size());
    %>
    <option value=<%=monTypeToyer%> <%if(monTypeToyer.equals(monTypeDetoyerSelected))
    out.print("selected");%>><b><font size="2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><%=monLibelleToyer%></font></b></option>
                             <%}
    }%>
    </select></td>
                        <td width="376" height="32" colspan="3"></td>
                        <td width="1" height="32"><spacer type="block" width="1" height="32"></td>
                   </tr>
                   <tr height="128">
                        <td width="288" height="128" colspan="3" valign="top" align="left" xpos="16">
                             <%if (!monTypeDetoyerSelected.equals(cVide))
    //String cVide="";
    Vector maTypeToyerDetailList = new Vector();
    //strNomNsimalen=request.getParameter("txtSearchFormNom").trim();
    maTypeToyerDetailList = toyerBean.getToyersDetailsSelected(monTypeDetoyerSelected);
    // Pour savoir la taille du vecteur
    if(maTypeToyerDetailList!=null && maTypeToyerDetailList.size()!=0)
    %>
    <table border="1" cellpadding="0" cellspacing="0" width="224" height="75">
              <tr height="19">
                                       <td height="19" width="20"></td>
                                       <td height="19" width="46"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="3"><b>Toyer</b></font></td>
                                       <td height="19" width="140"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="3"><b>Libell�</b></font></td>
                                  </tr>
    <%
    {  hashtableRegimeFiscalToyers= new Hashtable();
    System.out.println( " je passe dans le premier for");
    for(int i=0;i< maTypeToyerDetailList.size();i++)
    Hashtable myRecord = (Hashtable)maTypeToyerDetailList.elementAt(i);
    System.out.println( " je passe dans le premier for 1");
    String myCodeToyer ="";
    String myLibelleToyer="";
    String myTypeDeToyerCode="";
    myCodeToyer =(String)myRecord.get("TOY_CODE");
    myLibelleToyer =(String)myRecord.get("TOY_LIBELLE");
    // myTypeDeToyerCode=(String)myRecord.get("TTOY_CODE");
    System.out.println( " je passe dans le premier for 2");
    Hashtable hashToyerCaracteristique = new Hashtable();
    hashToyerCaracteristique.put("TOY_LIBELLE",myLibelleToyer);
    hashToyerCaracteristique.put("TTOY_CODE",monTypeDetoyerSelected);
    hashToyerCaracteristique.put("TTOY_LIBELLE",currentlibelleTypeDetoyer);
    hashtableRegimeFiscalToyers.put(myCodeToyer,hashToyerCaracteristique);
    System.out.println( " je passe dans le premier for 3");
    %>
                                  <tr height="19">
                                       <td height="19" width="20" align="center" valign="middle"><input type="radio" value='<%=myCodeToyer%>' name="radioCreateNsimalenFormCodeToyers"></td>
                                       <td height="19" width="46"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b><%=myCodeToyer%></b></font></td>
                                       <td width="140" height="19"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b><%=myLibelleToyer%></b></font></td>
                                  </tr>
    <%
    %>
    <%}%>
    </table>
                        </td>
    <% System.out.println( " je passe dans le premier for 4_1");
    if (hashtableToyerSelected==null)
    hashtableToyerSelected = new Hashtable();
    System.out.println( " je passe dans le premier for 4_2");
    if(hashtableToyerSelected!=null)
    System.out.println( " je passe dans le premier for 4_3");
    %>
    <td width="376" height="128" colspan="3" valign="top" align="left" xpos="304">
                             <table border="1" cellpadding="0" cellspacing="0" width="355" height="117">
                                  <tr height="38">
                                       <td height="38" width="32"></td>
                                       <td width="47" height="38"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="3"><b>Code</b></font></td>
                                       <td height="38" width="112"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="3"><b>Type de toyer</b></font></td>
                                       <td height="38" width="152"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="3"><b>valeur par d�faut</b></font></td>
                                  </tr>
    <%
    System.out.println( " je passe dans le premier for 3");
    if(!codeToyerSelectedToAdd.equals(cVide) && typeOperation.equals("add"))
    System.out.println( " je passe dans le premier for 3_a");
    Hashtable hashToyerCaracteristique = (Hashtable)hashtableRegimeFiscalToyers.get(codeToyerSelectedToAdd);
    hashtableToyerSelected.put(codeToyerSelectedToAdd,hashToyerCaracteristique);
    System.out.println( " je passe dans le premier for 3_a_fin");
    if(!codeToyerSelectedToRemove.equals(cVide) && typeOperation.equals("remove"))
    System.out.println( " je passe dans le premier for 3_a");
    System.out.println( "remove ");
    System.out.println(codeToyerSelectedToRemove);
    hashtableToyerSelected.remove(codeToyerSelectedToRemove);
    if (hashtableToyerSelected.size()!=0)
    for( Enumeration e=hashtableToyerSelected.keys();e.hasMoreElements();)
    System.out.println("je rentre dans la boucle");
    String codeToyer =(String)e.nextElement();
    Hashtable hashToyerCaracteristique = (Hashtable)hashtableToyerSelected.get(codeToyer);
    String libelleToyer =(String)hashToyerCaracteristique.get("TOY_LIBELLE");
    String libelleTypeToyer =(String)hashToyerCaracteristique.get("TTOY_LIBELLE");
    %>
    <tr height="19">
                                       <td height="19" width="32" align="center" valign="middle"><input type="checkbox" value="<%=codeToyer%>" name="radioCreateNsimalenFormCodeToyersRemove"></td>
                                       <td width="47" height="19"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b><%=codeToyer %></b></font></td>
                                       <td height="19" width="112"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b><%=libelleTypeToyer %></b></font></td>
                                       <td height="19" width="152"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b><%=libelleToyer %></b></font></td>
    </tr>
    <%
    /* if (!codeToyerSelected.equals(cVide) && hashtableToyerSelected==null)
    hashtableToyerSelected = new Hashtable();
    if(hashtableToyerSelected!=null)
    //insertion du code HTml pour afficher l'entete du tableau
    if(operationType.equals("ajout"))
    Hahstable toyersdetails = getToyersDetail(IdToyerSelected);
    hashtableToyerSelected.put( IdToyerSelected, toyersdetails);
    if(operationType.equals("remove"))
    hashtableToyerSelected.remove(IdToyerSelected);
    // avant d'afficher l'entete verifier qu'il ya des elements dans hashtableToyerSelected (
    // hashtableToyerSelected.size!=0
    //Affichage de la hashtable
    for( Enumeration e=hashtableToyerSelected.keys();e.hasMoreElements;)
    String IdToyers =(String)e.nextElement();
    Hashtable ToyersDetails = (Hashtable) hashtableToyerSelected.get(IdToyers);
    string defaultValue = (String)ToyersDetails.get(defaultValue);
    // on fait la mise en page apres avoir recuperer tous les caracteristiques
    %>
                   <!--     <td width="376" height="128" colspan="3" valign="top" align="left" xpos="304">
                             <table border="1" cellpadding="0" cellspacing="0" width="355" height="117">
                                  <tr height="38">
                                       <td height="38" width="32"></td>
                                       <td width="47" height="38"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="3"><b>Code</b></font></td>
                                       <td height="38" width="112"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="3"><b>Type de toyer</b></font></td>
                                       <td height="38" width="152"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="3"><b>valeur par d&eacute;faut</b></font></td>
                                  </tr>
                                  <tr height="19">
                                       <td height="19" width="32" align="center" valign="middle"><input type="checkbox" value="checkboxValue" name="checkboxName"></td>
                                       <td width="47" height="19"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>J</b></font></td>
                                       <td height="19" width="112"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Sp&eacute;cifique</b></font></td>
                                       <td height="19" width="152"><b><font size="3" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2">Nuit</font></b></td>
                                  </tr>
                                  <tr height="19">
                                       <td width="32" align="center" valign="middle" height="19"><input type="checkbox" value="checkboxValue" name="checkboxName"></td>
                                       <td width="47" height="19"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>K</b></font></td>
                                       <td height="19" width="112"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Quantit&eacute;</b></font></td>
                                       <td height="19" width="152"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Kilo</b></font></td>
                                  </tr> -->
                             </table>
                        </td>
                        <td width="1" height="128"><spacer type="block" width="1" height="128"></td>
                   </tr>
                   <tr height="51">
                        <td width="100" height="51" valign="top" align="left" xpos="16"><label><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Add</b></font></label></td>
                        <td width="188" height="51" colspan="2"></td>
                        <td width="224" height="51" valign="top" align="left" xpos="304"><label><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Remove</b></font></label></td>
                        <td width="152" height="51" colspan="2"></td>
                        <td width="1" height="51"><spacer type="block" width="1" height="51"></td>
                   </tr>
                   <tr height="13">
                        <td width="664" height="13" colspan="6" valign="top" align="left" xpos="16">
                             <hr width="644" size="2">
                        </td>
                        <td width="1" height="13"><spacer type="block" width="1" height="13"></td>
                   </tr>
                   <tr height="39">
                        <td width="512" height="39" colspan="4"></td>
                        <td width="80" height="39" valign="top" align="left" xpos="528"><label><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Save</b></font></label></td>
                        <td width="72" height="39" valign="top" align="left" xpos="608"><label><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2"><b>Fermer</b></font></label></td>
                        <td width="1" height="39"><spacer type="block" width="1" height="39"></td>
                   </tr>
                   <tr height="1" cntrlrow>
                        <td width="16" height="1"><spacer type="block" width="16" height="1"></td>
                        <td width="100" height="1"><spacer type="block" width="100" height="1"></td>
                        <td width="32" height="1"><spacer type="block" width="32" height="1"></td>
                        <td width="156" height="1"><spacer type="block" width="156" height="1"></td>
                        <td width="224" height="1"><spacer type="block" width="224" height="1"></td>
                        <td width="80" height="1"><spacer type="block" width="80" height="1"></td>
                        <td width="72" height="1"><spacer type="block" width="72" height="1"></td>
                        <td width="1" height="1"></td>
                   </tr>
              </table>
              <p></p>
    </form>
    </body>
    </html>

  • How to use extends attribute in jsp page directive

    Can anybody tell how to extend a existing .jsp file from another .jsp file. I have tried but it gives error.
    I have used Extends attribute of page directive as below:
    <%@ page extends = "MyAnotherJsp.jsp"%>
    I also tried : <%@ page extends = "MyAnotherJsp"%>
    I am using Tomcat as a web server
    Also tell where to put those files.
    Thanks.

    Hi I am using Netbeans 5.5, Sun Java System Application Server 9.
    ABC.java
    package javapackage;
    public class ABC{
    public String show(){
    return "Sandip Gaikwad";
    index.jsp
    <%@ page extends="javapackage.ABC" %>
    <html>
    <head>
    <title>JSP Page</title>
    </head>
    <body>
    <h1>JSP Page </h1>
    </body>
    </html>
    Above code throws following exception at runtime:-
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    [javac] F:\Sun\AppServer\domains\domain1\generated\jsp\j2ee-modules\Page_Extends_Attribute_Example\org\apache\jsp\index_jsp.java:36: getPageContext(javax.servlet.Servlet,javax.servlet.ServletRequest,javax.servlet.ServletResponse,java.lang.String,boolean,int,boolean) in javax.servlet.jsp.JspFactory cannot be applied to (org.apache.jsp.index_jsp,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,,boolean,int,boolean)
    [javac] pageContext = _jspxFactory.getPageContext(this, request, response,
    [javac] ^
    [javac] 1 error
    Server log
    StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    [javac] F:\Sun\AppServer\domains\domain1\generated\jsp\j2ee-modules\Page_Extends_Attribute_Example\org\apache\jsp\index_jsp.java:36: getPageContext(javax.servlet.Servlet,javax.servlet.ServletRequest,javax.servlet.ServletResponse,java.lang.String,boolean,int,boolean) in javax.servlet.jsp.JspFactory cannot be applied to (org.apache.jsp.index_jsp,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,<nulltype>,boolean,int,boolean)
    [javac] pageContext = _jspxFactory.getPageContext(this, request, response,
    [javac] ^
    [javac] 1 error
    at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:94)
    at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:384)
    at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:461)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:528)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:507)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:495)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:530)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:412)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:318)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    If I delete the line <%@ extends="javapackage.ABC"%> it works fine. Please tell me what is wrong with this line.

  • How to add multiple bean id in a jsp page

    i need to add two bean id in a single jsp page can anyone suggest me how can i do that?
    <jsp:useBeanid="newmember" class = "com.assignment.member" scope ="request"/>now if i want to add another bean id in the same jsp page is that possible? how can i do that? please help

    <jsp:useBeanid="newmember" class = "com.assignment.member" scope ="request"/>
    <jsp:useBeanid="newmember2" class = "com.assignment.member2" scope ="request"/>
    <jsp:useBeanid="newmember3" class = "com.assignment.membe3r" scope ="request"/>
    upto N bean

  • ER: organize imports in an "import" attribute of a JSP page directive

    Hi,
    it would be useful to see packages/classes hierarchy when changing the "import" attribute of <%@ page %> directive. It might be as well to have all possibilities of imports processing as in .java classes (autoadding, remove unused import, etc.)
    Thanks in advance.

    Hello Scott,
              First, you have to define this page directive in your static page or JSP
              page :
              <%@ page contentType="text/html; charset=UTF8" %>
              Check your your weblogic.properties file for the following settings:
              weblogic.httpd.inputCharset specifies encoding used when changing into the
              internal code of Java from the parameter of the browser's request. If you
              use Shift_JIS in HTML or JSP, please set
              weblogic.httpd.inputCharset./*=Shift_JIS.
              weblogic.codeset specifies encoding used when jDriver stores data in an
              Oracle database and it changes into the character code of a database from
              the internal code of Java. If you use ja16sjis in Oracle database, please
              set the same encoding as NLS_LANG to weblogic.codeset.
              Hope this helps
              Ludovic.
              Developer Relations Engineer
              BEA Support
              "Scott Mark" <[email protected]> a écrit dans le message news:
              3cd67e5d$[email protected]..
              > Did you ever get around this? Is there an issue with UTF-8 encoding?
              >
              > We are going to have to deliver a site in Japanese soon, and are
              researching how well WLS handles double-byte chars...
              

  • How to add Jsp pages into existing portal (JDeveloper 9.0.4)

    I am a jsp developer. I have to add a jsp page into existing portal. I am new to portal. Could anyone help me how to develop jsp using portal classes like PortletRenderRequest,ProviderSession and others.

    Rigoberto, there should be no space between "-Xbootclasspath/p:" and the path "C:\oracle\infra\jdbc-10.1.0.4\ojdbc14.jar;C:\oracle\infra\jdbc-10.1.0.4\orai18n.jar"
    By the way, one can always take a look at the logs at
      $ORACLE_HOME/opmn/logs
    especially those files whose names start with OC4J~ if there is some wrong with oc4j processes. Those files are the default oc4j stout and sterr. If oc4j can not init, there should be some kind of error message in them.
    By the way, the following line may be deleted since no property file is specified.
      <data id="oc4j-options" value="-properties"/>
    Hope this helps.

  • Where is the direct download page for Ps CC? CC webpage will not download and install the app. Ps CC does not appear in CC Desktop.

    Win 7 Home Premium. Photoshop CC was crashing constantly and some features would not work properly. I uninstalled and now cannot get it to reinstall from the CC Website, Photoshop CC does not appear in the CC Desktop app. In the past I have been directed to a page where I could directly access the download, but I cannot find that page.

    ShowLowAZ please try utilizing a different web browser.  As an alternative please see Install and update apps - https://helpx.adobe.com/creative-cloud/help/install-apps.html for information on how to install directly from the Creative Cloud Desktop application.

Maybe you are looking for

  • Open a URL in the same window

    Hi, My objective is to open a URL when i click on a webdynpro iView in the same window. I created a outbound plug in the InterfaceViewController. And wrote this piece of code in wdDoBeforeNavigation() in Component controller. wdThis.wdGetExternalComp

  • How Can I Find Out If Someone Is Spying On My Macbook?

    How can I find out if someone is spying on my macbook?  It's about 5  years old and I think someone is remotely controlling it even though my remote management and screen sharing is always off in the Sharing panel in Systems Preferences.   I don't SH

  • Error message in Web UI

    Greetings I am getting the following error message and ive tried numerous attempts to debug but i am not finding the problem. This message is displayed on the web page after i log in. An error occurred during initialization of the application An exce

  • Indesign cc wont open error 0xc0000076

    Downloaded InDesign cc from the app - application unable to start correctly error 0xc0000076. I need to know how to unistall it or fix the problem. I wish it wasnt so complicated - an unistall button would be good. Who has the time to be a techy when

  • How to handle checkbox in struts

    Hi, Can you help me how to handle checkbox in Struts? When i select/unselect checkbox in one page ,It should be selected/unselected stage when i come next time to that same page.