Problems with include jsp

Hi... my english are not good enough but im trying to explain.
I wanna include a url using <jsp:include tag, but my url have params.... so i know i have to use <jsp:param 4 each param.... So i did a little scriptlet that takes the url and separe each param to put it in a bidimensional array then i make a string with all the result... i mean... <jsp:inlcude page="relative URL" flush="true"><jsp:param name="hi" value="2"/>... next param... next param... </jsp:inlcude>.... i write the string at the jsp but it seems doesnt work.. this i made it with a document.write...
the problem here is... the string its ok coz if i cut and paste the result i work great... but... if i make it dynamically ... nothing happens....
Either i did put it the bidimensional array at the request.setAttribute for catch it at the next jsp and make a bucle for... but the same trouble... nothings happen...
Some idea? :(

You definitely want to use a jsp include action, not a directive. The directive
happens at translation time and does not process the requested page. An action
happens at request time and treats the requested page as a new request, thus
including the results of the invoked jsp.
BTW, the include action is the tags that looks line <jsp:inculde
page="included_page.jsp" flush="true"/> or something similar (parameters can
also be specified).
The JSP 1.1 spec has more details. See sections 2.7.5 & 2.7.6 (for the include
directive and a quick comparison of the directive vs the action) and 2.13.4 (for
the include action).
Matt
Gurjit wrote:
Hi ,
I have a typical problem. The iplanet server doesn't interpret the code
from a jsp which is included in another jsp. For eg.
code for main jsp
request.getParameter("username");
<%@ include file="/jsp/ui/left_nav.jsp" %>
processing code.
Now when I start the server and the first time I load this page I get a
dearranged page which has the code of the left_nav.jsp present in the html
output.
On opening this page to edit, when a small modification is made and the file
is saved, a reload of the same page gives the proper output with all the
jsp's interpreted.
Thanks to one and all,
Regards,
Gurjit

Similar Messages

  • Problem with include and relative path in jsp

    Precompile jsp with wlappc in 9.2, I got the error "The include file was not found" when the jsp use <%@ include file="../includes/dataEntry/code_error.html" %>
              This code used to work with 8.1. I notice that someone has report the same problem with 9.0 and you have patch for it. Is it fix in 9.2 or do I require a patch as well?
              Thanks,
              Khuemy

    When you precompile, can you say "Keepgenerated=TRUE". It might help you track
              down the difference with the URL. You should only get a 404 error when the
              resource is not found at runtime, which is independant of when you compile. The
              difference should be in how the URL is compiled.
              Chris
              ali wrote:
              > I am using WLS 6.0 SP1, when I use relative path in <jsp:forward> in my JSPs
              > it forwards ok if I am using directly JSPs but if I am using pre-compiled
              > JSPs (and have proper servlet-mappings
              > in my web.xml), I get 404 error with the relative-path, if I change it to
              > absolute path with pre-compiled JSPs it forwards ok , then.
              > any ideas why this is so?
              > thanks,
              

  • Ergent problem with the jsp file access in tomcat. HELP...

    I use tomcat as my server, I have one JSP file located in :
    webapps\abc\war\WEB-INF\jsp\index.jsp
    You see my project name is abc, I want to access the index.jsp file, I define another jsp file in the path: webapps\abc callled outside.jsp. I want to use outside.jsp to invoke the index.jsp.
    Inside outside.jsp it is :
    <html>
    <head>
    <title>index</title>
    </head>
    <body>
    <%@ include file="war/WEB-INF/jsp/index.jsp" %/>
    </body>
    </html>
    When I open the browser, and access, http://localhost:8080/abc/outside.jsp , the content of index.jsp was shown as expect. But, all the link pages of the index.jsp can not shown (PS: the link pages is located in the same path as index.jsp, they are all jsp files). I guess the problem may be that the <%@ include file="war/WEB-INF/jsp/index.jsp" %/> inside outside.jsp include the index.jsp as a static file. Is there any method to make all the link pages of index.jsp can be shown when call from outside.jsp???HELP
    Message was edited by:
    Mellon
    Message was edited by:
    Mellon

    I don't know why your links can't be shown, but I can tell you that your suspect:
    I guess the problem may be that the <%@ include file="war/WEB-INF/jsp/index.jsp" %/> inside outside.jsp include the index.jsp as a static file.is wrong, because included jsp is dynamic, not static.

  • Problem with renaming JSPs in Eclipse

    Has anyone experienced problem with Eclipse WTP failing to locate JSP after they are named? I've been able to reproduce this consistently, where if I rename a JSP after it's created (e.g. Transactions.jsp -> transactions.jsp), I get the following error when I attempt to access that JSP within the browser:
    javax.servlet.ServletException: org/apache/jsp/transactions_jsp (wrong name: org/apache/jsp/Transactions_jsp)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:272)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    It seems the internal state of the translated JSP Java class is messed up.
    Johnny

    I've found the solution!
    It turns out, on case sensitive system like Mac OS X, Eclipse has trouble recognizing a renamed JSP if you only change the capitalization of the file name. The way to fix it is to delete the JSP from Eclipse (doesn't work if you delete it from the file system), which I think clears Eclipse's corrupt memory of the file, and add the file back in.
    I'll report this bug and see if others can reproduce the same problem.
    Repro:
    (Observed on Mac OS X)
    1. Create a JSP, name it "home.jsp"
    2. Verify home.jsp can be accessed in the browser.
    3. Rename "home.jsp" to "Home.jsp"
    4. Now, neither "home.jsp" nor "Home.jsp" could be accessed. In order to fix this, you have to delete "Home.jsp" and add it back into Eclipse.

  • Problems with include where the include is a jsp

    Hi ,
    I have a typical problem. The iplanet server doesn't interpret the code
    from a jsp which is included in another jsp. For eg.
    code for main jsp
    request.getParameter("username");
    <%@ include file="/jsp/ui/left_nav.jsp" %>
    processing code.
    Now when I start the server and the first time I load this page I get a
    dearranged page which has the code of the left_nav.jsp present in the html
    output.
    On opening this page to edit, when a small modification is made and the file
    is saved, a reload of the same page gives the proper output with all the
    jsp's interpreted.
    Thanks to one and all,
    Regards,
    Gurjit

    You definitely want to use a jsp include action, not a directive. The directive
    happens at translation time and does not process the requested page. An action
    happens at request time and treats the requested page as a new request, thus
    including the results of the invoked jsp.
    BTW, the include action is the tags that looks line <jsp:inculde
    page="included_page.jsp" flush="true"/> or something similar (parameters can
    also be specified).
    The JSP 1.1 spec has more details. See sections 2.7.5 & 2.7.6 (for the include
    directive and a quick comparison of the directive vs the action) and 2.13.4 (for
    the include action).
    Matt
    Gurjit wrote:
    Hi ,
    I have a typical problem. The iplanet server doesn't interpret the code
    from a jsp which is included in another jsp. For eg.
    code for main jsp
    request.getParameter("username");
    <%@ include file="/jsp/ui/left_nav.jsp" %>
    processing code.
    Now when I start the server and the first time I load this page I get a
    dearranged page which has the code of the left_nav.jsp present in the html
    output.
    On opening this page to edit, when a small modification is made and the file
    is saved, a reload of the same page gives the proper output with all the
    jsp's interpreted.
    Thanks to one and all,
    Regards,
    Gurjit

  • Having Problem with IFRAME (JSP) Netscape!HELP!!!

    Hi ppl :)
    I�m having problems working out with netscape. If i use a script with one iframe(and i must use it...) at I.Explorer it works but with netscape, no way, the "box" doesn�t appear. :( I need HELP!!
    tHIS IS THE CODE :)
    <html>
    <head>
    <!--fd002_captura_dados_POR.jsp-->
    <title>BBVA - Fundos - Subscri&ccedil;&atilde;o de Fundos</title>
    <LINK rel=STYLESHEET type='text/css' href="estilos/tablas.css">
    <script language="Javascript" src="js/fd001_captura_dados.js"></script>
    <script language="javascript" src="js/limpar.js"></script>
    <script language="javascript" src="js/tiempo.js"></script>
    </HEAD>
    <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0" class="pag-contenido" onLoad="controlSesion();">
    <%@ include file="includecbtf.jsp" %>
    <%
    out.println("<form method=\"post\" name=\"captura\" action=\"" + urls.get("action") + "\"> ");
    %>
    <br>
    <center>
    <table border="0" cellpadding="0" cellspacing="0" width="500">
    <tr>
    <td colspan="3" ><img src="images/linea1.gif" border="0"></td>
    </tr>
    <tr>
    <td width="250"><img src="images/fundos.gif" border="0"></td>
    <td width="82"><img src="images/titular.gif" border="0"></td>
    <td width="169" class="fondotitular"><font class="texttitular"><%=datos.get("usuario")%></font></td>
    </tr>
    <tr>
    <td colspan="3"><img src="images/linea1.gif" border="0"></td>
    </tr>
    </table>
    <br><br>
    </center>
    <center>
    <table cellpadding="3" cellspacing="1" border="0" width="535">
    <tr>
    <td class="cabeceratitulo" colspan="4"><p class="titulotabla">Inten&ccedil;&atilde;o de Subscri&ccedil;&atilde;o do Fundo <%=datos.get("CodigoFundos")%></p></td>
         </tr>
         </td>     
    <table>
    <tr>
    <td class="cabeceratitulo" colspan="4"><p class="titulotabla">Condi&ccedil;&otilde;es</p></td>
    </tr>
    <tr>
    <td class=altas colspan="2" >
    <%
    java.lang.String selec1 = (java.lang.String)datos.get("CodigoFundos");
         String selec= selec1;
         String sel="";
         if(selec.equals("ACC"))
         sel= "fundo1.txt";
         if(selec.equals("APL"))
         sel= "fundo1.txt";
         if(selec.equals("BBVD"))
         sel= "fundo1.txt";
    if(selec.equals("BBVO"))
         sel= "fundo1.txt";
         if(selec.equals("BIT"))
         sel= "fundo1.txt";
         if(selec.equals("BON"))
         sel= "fundo1.txt";
    if(selec.equals("CAS"))
         sel= "fundo1.txt";
         if(selec.equals("CPZ"))
         sel= "fundo1.txt";
         if(selec.equals("EXT"))
         sel= "fundo1.txt";
         if(selec.equals("FINVEST"))
         sel= "fundo1.txt";
         if(selec.equals("GLO"))
         sel= "fundo1.txt";
         if(selec.equals("MIX30"))
         sel= "fundo1.txt";
         if(selec.equals("MIX60"))
         sel= "fundo1.txt";
         if(selec.equals("MI3"))
         sel= "fundo1.txt";
         if(selec.equals("MI6"))
         sel= "fundo1.txt";
         if(selec.equals("PPA"))
         sel= "fundo1.txt";          
    if(selec.equals("PPR"))
         sel= "fundo1.txt";
         if(selec.equals("TXV"))
         sel= "fundo1.txt";          
         %>
    <iframe width=500 height=300 src=js/<%=sel%>></iframe>
    </tr>
    <tr>
    <td align="right">
         <img src="images/aceito.gif" border="0" alt="Aceito">
    </td>
    <td>
         <img src="images/naceito.gif" border="0" alt="N�o Aceito">
    </td>
    </tr>
    </table>
    <br>
    </center>
    <center>
    <table cellpadding="3" cellspacing="1" border="0" width="535">
    <tr>
    <td class="cabeceratitulo" colspan="4"><p class="titulotabla">Inten&ccedil;&atilde;o de Subscri&ccedil;&atilde;o de Fundos</p></td>
         </tr>
    <tr>
    <td class="formgrisosc" width="120"><p class="dato">Seleccione Conta:     </p></td>
    <%
    java.util.Vector v = (java.util.Vector)(datos.get("ListaCuentas"));
    java.util.Hashtable elem;
    java.util.Enumeration e = v.elements();
    %>
                   <td class="formgrisosc" colspan="3">
    <select name="conta" size="1" class="formgrisosc">
    <%
    while (e.hasMoreElements()){
    elem = (com.ibm.dse.base.Hashtable)(e.nextElement());
    String cuenta = ((String)elem.get("s_banco")).trim()+"-"+((String)elem.get("s_oficina")).trim()+((String)elem.get("s_dcontrol")).trim()+((String)elem.get("s_num_cuenta")).trim();
    out.println("<option value=\"" + cuenta + "\">" + cuenta + "</option>");
    %>
    </select>
    </td>
    <tr>
    <td class="formgriscla" width="120"><p class="dato">Tipo de Subscri��o:</p></td>
    <td class="formgriscla" colspan="3">
              <select name="tiposubs" size="1" class="formgriscla">
    <option>Eventual</option>
    </select>
    </td>
    </tr-->
    <tr>
    <td class="cabecera" colspan="4"><img src="images/1x1.gif" width=1 height=3 border="0"></td>
    </tr>
    </table>
    <br><br>
    <table cellpadding="3" cellspacing="1" border="0" width="535">
    <tr>
    <td class="cabeceratitulo" colspan="4"><p class="titulotabla">Preencha um dos seguintes campos</p></td>
         </tr>
    <tr>
    <td class="formgrisosc" width="120"><p class="dato">N�mero de Up's:</p></td>
    <td class="formgrisosc" colspan="3">
    <input type="text" name="numero" size="15" maxlength="15" class="formgrisosc">
    </td>
    </tr>
    <tr>
    <td class="formgriscla" width="120"><p class="dato">Montante:</p></td>
    <td class="formgriscla" width="80"><input type="text" name="montante" size="15" maxlength="15" class="formgriscla"></td>
    <td class="formgriscla" width="50"><p class="dato">Moeda:</p></td>
    <td class="formgriscla">
    <select name="moeda" size="1" class="formgriscla">
    <option value="Escudos" selected>Escudos</option>
    <option value="Euro" >Euros</option>
    </select>
    </td>
    </tr>
    <tr>
    <td class="cabecera" colspan="4"><img src="images/1x1.gif" width=1 height=3 border="0"></td>
    </tr>
    </table>
    </center>
    <center>
    <table border="0" cellpadding="0" cellspacing="2">
    <tr>
    <td valign="top"><img src="images/limpar.gif" border="0" alt="Apagar"></td>
    <td valign="top"><img src="images/continuar.gif" border="0" alt="Continuar"></td>
    </tr>
    </table>
    </form>
    </center>
    <br><br>
    </body></html>
    Please help me out, because the iframes are terrible!
    thanks,
    Alex

    The <IFRAME> tag is IE specific; Netscape doesn't
    recognize it.
    Netscape uses the <LAYER> and <ILAYER> tags to
    accomplish the same thing; if you need to have a
    page-internal frame that has its own source, you'll
    need to use one of these tags.
    If you need to work with both browsers, you'll need to
    write out your tag based on the browser being used.
    Have fun!hello!
    I need one way to call another page, like you see in the code, a extension.txt, how can i do that?? can you make a sugestion?
    The <ilayer> doesn�t work :(

  • Problems with tabbed JSPs

    Hi ,
    I have a JSP which is a tabbed one . I need to have common values in all the 5 tab pages of a single JSP . The problem im facing is , the common values entered in the first tab page only gets carried forward to the subsequent tab pages . In case if i directly go to the second tab page and enter these values they are not carried on to any of the other tab screen .
    Has any one encountered such a situation ? Can come one provide me a solution .
    Thanks
    Varada

    Hi Linxpda ,
    Yeah , iam making use of a JS file to include tabs in my JSPs . All it does is to give each Tab of the JSP page a name . But for that its the conventional MVC flow.
    I have a JSP called LoanDetails.jsp and i have a formBean associated to it [ LoanView.java ] .. Iam making use of Struts1.1 to bind the controls in JSP to foem bean . If i have two tabs TAB1 and TAB2 in LoanDetails.jsp and i have some common controls for both the Tab pages , say accountId . If i fill in any value for account Id in TAB1 , it is seen in TAB2 also . On the other hand if i fill in the same value in TAB2 , it is neither retained in TAB2 nor seen in TAB1 .
    Can you help me with a sugggestion ?
    varada

  • Problem with login jsp

    I made a login.jsp with the help of a bean. the bean holds a string[] as a property where it stores user and pass, then those values are checked in my database, and a boolean bean property is set to true. The problem is I want to do an if statement in my JSP using that boolean, but I can't seem to get the jsp working, can anyone help me?
    I'm doing
    <%if (<jsp:getProperty name="auth" property="truth"/>) do something else something else%>
    I've also tried
    <%! boolean it = <jsp:getProperty name="auth" property="truth"/> %>
    <%if (it) do something else something else%>
    both give me compile errors.

    <jsp:getProperty name="auth" property="truth"/> is roughly equivalent to
    <% out.print(your_bean.getTruth()); %> or <%=your_bean.getTruth()%>
    Once you understand this, you'll see why your code cannot possibly work...
    Below is a simple solution to your problem.
    <jsp:useBean   class="YourBean"  id="auth"  etc.. >
    <% if auth.getTruth() {
          something; // don-t forget the semi-colon
       else {
          some other thing; // ditto
    %>If you don't want any java code inside your jsp, consult the JSTL tag lib to construct an xml-like if-else statement.

  • Initial Set Up Problem With Included Cable

    As I excitedly unpacked my new ipad yesterday and cut it on I got the connect to itunes alert on the screen which I expected. When I made the connection with the included cable to my laptop and activated itunes nothing happened, itunes never recognized the ipad and cutting the ipad on off just continued to show the connect to itunes alert. I was beginning to panic a little at that point. Tried closing and reopening itunes, rebooting the computer, rebooting the ipad. Nothing worked. Then I tried that reset method of holding down the sleep/wake and home buttons down until the Apple symbol comes up. Apparently doing it the way I did put it in recovery mode which for some reason itunes recognized and went through the laborious process of downloading the software and preforming a restore.
    I wasn't happy about that but at least itunes finally "saw" the ipad. So after it went through that process a message came up that the restore was being verified with Apple. After several minutes of that got a message that restore had failed. Now I was really panicked and tried to do the same all over again hoping that it would work. Well it didn't work, kept coming back to the failed message and essentially now I had a brick. I calmed down a little and went online to make an appointment with the genius bar of a local Apple store for this morning. Out of curiosity and as a last resort I tried one of my iphone cables and right away I noticed something. Whenever you connect an ipod touch, iphone or ipad to a charger you get that little audible sound that I call a trill. Well I heard that right away when I used the iphone cable which made me realize that I had not heard that on any of my previous attempts. iTunes saw the ipad, went through the activation process and everything set up fine afterwards. I cancelled the genius bar appointment.
    I thought I would post this just in case others may run into the same problem. By the way my wifi has worked perfectly so far with no connection issues. Don't know when or if I will set up the 3G access.

    Thanks for the suggestion but I did purchase Applecare as well so I shouldn't have any problem if there is an issue. And I probably will check out 3G at some point but for now there are no issues at all, no wifi connection issues, no drops coming out of sleep, no weak or slow connections. Nothing like what I've read in these other threads so I don't really expect any 3G problems.

  • Problem with the jsp printing

    Can anyone help me please with jsp i have the following problem can you help me.
    This is my console printing:
    null16-08-2006 REPLY TIME: 14:34:32
    REPLY : Hinknff
    null16-08-2006 REPLY TIME: 14:36:34
    REPLY : Hu jjdfgf
    null16-08-2006 REPLY TIME: 14:39:57
    REPLY : ffffffffffffffffff
    but this is my webpriniting:
    null16-08-2006 REPLY TIME: 14:34:32 REPLY : Hinknff null16-08-2006 REPLY TIME: 14:36:34 REPLY : Hu jjdfgf null16-08-2006 REPLY TIME: 14:39:57 REPLY : ffffffffffffffffff null16-08-2006 REPLY TIME: 14:44:58 REPLY : nnnnngf REPLY DATE:16-08-2006 REPLY TIME: 15:45:18 REPLY : Replughjfgjgf REPLY DATE:16-08-2006 REPLY TIME: 15:47:39 REPLY : Rn,kgdfg REPLY DATE:16-08-2006 REPLY TIME: 15:49:48 REPLY : Rngm,ng,df
    that is i am not getting it in web as i get in console can you please help me how can i do that.
    below is the partial code for printing in which i have used vector,strings only.
    String qu = nn2.elementAt(j)+"";
    String re = nn3.elementAt(j)+"";
    String b= qu;
    String b1 = re
    System.out.println(b1);
    String redt1 = nn4.elementAt(j)+"";
    if(redt1.equals("No Reply")){
    redt.append(redt1);
    retime.append(redt1);
    else
    String redtt=redt1.substring(8,10);
              String remonth=redt1.substring(5,7);
              String reyear=redt1.substring(0,4);
              String rehh=redt1.substring(11,13);
              String remm=redt1.substring(14,16);
              String ress=redt1.substring(17,19);
    redt.append(redtt+"-"+remonth+"-"+reyear);
    retime.append(rehh+":"+remm+":"+ress);
    } %>
    <br>
    <table>      
    <tr">
    <td>
    <b>Query Posted Date</b>
    <%out.println(qudt);%>
    <b>Query Posted Time :</b>
    <%out.println(qutime);%>
    <br>
    <b style="font-family:verdana;font-size:80%;color:green">Query :</b>
    <%out.println(b);
    %>
    </td>
    </tr>
    </table>
    <br>
    <table>
    <tr bgcolor="rgb(174,174,250)">
    <td>
    <b>Last Reply Posted Date</b>
    <%out.println(redt);%>
    <b>Last Reply Posted Time :</b>
    <%out.println(retime);%>
    <br>
    <b style="font-family:comicscans;font-size:80%;color:Red">Reply :</b>
    <%
    out.println(b1);
    int qudtsize = qudt.length();
    qudt.delete(0,qudtsize);
    int qutimesize = qutime.length();
    qutime.delete(0,qutimesize);
    int redtsize = redt.length();
    redt.delete(0,redtsize);
    int retimesize = retime.length();
    retime.delete(0,retimesize);
    %>
    <br>
    </td>
    </tr>
    </table>
    <br>
    <% }
    connection.close();
    }catch(SQLException e)
    e.printStackTrace();
    %>
    <input type="submit" value="Back" onClick="calljsp1()"/>
    </form>
    </body>
    </html>

    Hi.
    Even i am getting the similar exception. The JSP report works fine on Oracle 9iDS. But throws following exception in Oracle 9iAS. I have already tried recompiling, etc but to no avail.
    Any help in this regard is highly appreciated.
    javax.servlet.jsp.JspException: rwlib-1: REP-1247: Report contains uncompiled PL/SQL.
    javax.servlet.jsp.JspException: rwlib-1: REP-1247: Report contains uncompiled PL/SQL.
    at oracle.reports.jsp.ObjectsTag.doEndTag(ObjectsTag.java:180)
    at examples.tools._fapsreports._StudentReimbursementScheduleExcelReport._jspService(_StudentReimbursementScheduleExcelReport.java:80)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:302)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:407)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:330)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:59)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:535)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:281)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:766)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:152)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:72)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:802)
    at java.lang.Thread.run(Thread.java:484)

  • Problems with custom JSP Tag, can someone offer some advice?

    Greetings,
    I have a problem here that I am stumped on. I am trying to create a custom JSP tag, I created a simple "Hello World" JSP, however, I am coming up a bit short. I am running Apache Tomcat 6.0 on a Win XP environment.
    The code I have is as follows:
    TLDTest.tld:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
    "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_2.dtd">
    <taglib>
         <tlibversion>1.0</tlibversion>
         <jspversion>1.2</jspversion>
         <shortname>firstTag</shortname>
         <info>My First Tag</info>
    <!-- Here goes nothing!!! -->
    <tag>
         <name>hola</name>
         <tagclass>Hola</tagclass>
         <bodycontent>empty</bodycontent>
         <info>a simple hello tag</info>
    <!-- attributes -->
    <!-- Personalize the name -->
    <attribute>
         <name>name</name>
         <required>false</required>
         <rtexpvalue>false</rtexpvalue>
    </attribute>
    </tag>
    </taglib>
    The Hola.jsp is:
    <%@ taglib uri="/Hola" prefix="test" %>
    <html>
         <head>Just a little test on tags</head>
         <body>
              <hr />
              <test:Hola name="Woot Master" />
              <hr />
         </body>
    </html>
    And the source code for the .class file (named Hola) is:
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    public class Hola extends TagSupport
         private String name = null;
         public void setName(String value)
              name = value;
         public String getName()
              return(name);
    /* doStartTag is called and defined below here for the java tag */
         public int doStartTag()
              try
                   JspWriter out = pageContext.getOut();
                   out.println("<table border=1>");
                        if (name != null)
                             out.println("<tr><td> Hola " + name + "!" + "</td></tr>");
                        else
                             out.println("<tr><td> Hola! Porque tu es una piquito perra? </td></tr>");
              catch (Exception ex)
                   throw new Error("Dio's Mio!, Esta No Va!, tu problema es en la StartTag!!!");
              return SKIP_BODY;
    /* doEndTag is defined here. */
         public int doEndTag()
              try
                   final JspWriter out = pageContext.getOut();
                   out.println("</table>");
              catch (final Exception ex)
                   throw new Error("Oops, it's broken, check your coding in the End tag!!!");
    What I keep getting is the following error:
    org.apache.jasper.JasperException: /Hola/Hola.jsp(6,2) No tag "Hola" defined in tag library imported with prefix "test"
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:198)
    I've been back and forth on this, but I am lost. Obviously I am missing something, but what is it? It wouldn't be in the web.xml file would it? I am running a vanilla tomcat install. Any help that anyone can provide would be greatly appreciated.
    Sincerely,
    - Josh

    Ok
    1 - In the JSP, your tag should be "hola" not "Hola". Yes case matters.
      <test:hola name="Woot Master" />2 - Importing the taglibrary correctly.
    Either reference its tld <%@ taglib uri="/WEB-INF/Hola.tld" prefix="test" %>
    (and have the tld file sitting in /WEB-INF/Hola.tld )
    or
    Define a uri for it in the tld...
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.2</jspversion>
    <shortname>firstTag</shortname>
    <uri>http://mytag/hola</uri>
    ...and then use that uri to import it in your JSP
    <%@ taglib uri="http://mytag/hola" prefix="test" %>
    3 - Put your tag class in a package. Classes not in packages have a way of not being found.
    package mypackage
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    public class Hola extends TagSupport {
    ...That will move it in your folder structure to be /mypackage/Hola.java
    You would also need to update the tagclass element in the tld to reflect the change:
    <tagclass>mypackage.Hola</tagclass>4 - Mistake in your tld: You are missing an "r" in "rtexprvalue". <rtexpvalue> should be <rtexp*r*value>
    5 - In your Tag class, you should return something from the "doEndTag()" method.
    return super.doEndTag(); or maybe return EVAL_PAGE;
    Revised code:
    WEB-INF/hola.tld
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
    "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_2.dtd">
    <taglib>
         <tlibversion>1.0</tlibversion>
         <jspversion>1.2</jspversion>
         <shortname>firstTag</shortname>
         <uri>http://mytag/hola</uri>
         <info>My First Tag</info>
         <!-- Here goes nothing!!! -->
         <tag>
              <name>hola</name>
              <tagclass>mypackage.Hola</tagclass>
              <bodycontent>empty</bodycontent>
              <info>a simple hello tag</info>
              <!-- attributes -->
              <!-- Personalize the name -->
              <attribute>
                   <name>name</name>
                   <required>false</required>
                   <rtexprvalue>false</rtexprvalue>
              </attribute>
         </tag>
    </taglib>hola.jsp:
    <%@ taglib uri="http://mytag/hola" prefix="test"%>
    <html>
      <head>Just a little test on tags</head>
      <body>
        <hr />
        <test:hola name="Woot Master" />
        <hr />
      </body>
    </html>Hola.java. Compiles into WEB-INF/classes/mypackage/Hola.class
    package mypackage;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    public class Hola extends TagSupport {
         private String name = null;
         public void setName(String value) {
              name = value;
         public String getName() {
              return (name);
         /* doStartTag is called and defined below here for the java tag */
         public int doStartTag() {
              try {
                   JspWriter out = pageContext.getOut();
                   out.println("<table border=1>");
                   if (name != null)
                        out.println("<tr><td> Hola " + name + "!" + "</td></tr>");
                   else
                        out.println("<tr><td> Hola! Porque tu es una piquito perra? </td></tr>");
              } catch (Exception ex) {
                   throw new Error("Dio's Mio!, Esta No Va!, tu problema es en la StartTag!!!");
              return SKIP_BODY;
         /* doEndTag is defined here. */
         public int doEndTag() {
              try {
                   final JspWriter out = pageContext.getOut();
                   out.println("</table>");
                   return super.doEndTag();
              } catch (final Exception ex) {
                   throw new Error("Oops, it's broken, check your coding in the End tag!!!");
    }Cheers,
    evnafets

  • Problems with include tags

    Ok, I am having a peculairly annoying problem for my site. My include tags (action or directives) are not working approx. 40% of the time. They did work in the past but they are not today. So for instance any of my pages that are referring to a common navigation bar using an include action show up without the navigation bar. It is a total mess. I am not sure if it is my servers fault or mine. I have already complained to my website provider but I was wondering if there is anything I can do to make them work or atleast throw an error when they dont get displayed instead of what its doing right now. If you think its a server issue, I would appreciate any tech jargon you can provide me to throw at them. They tend to say things like "it worked for me."
    Btw, I havnt done anything fancy.. in a normal html page I have included an include action(s). None of my pages have more than 2 actions and 1 directive. Most have only 1 action.

    Could you post a sample of a JSP causing the problem?

  • Problem with javascript jsp

    Hi,
    I am using following htl in my jsp.
    <INPUT type=CHECKBOX name='markets' value='911|6' >
    I am using the following javascript in on submit event
    alert(document.form.markets.length );But i am getting "undefined" in my alert box.However if there are more such checkboxes named market...i am getting the length as output.
    what may be the problem?
    Thanks
    Vivek

    i tried this and its working fine:
    alert(document.forms[0].markets.length );
    <form>
    <INPUT type=CHECKBOX name='markets' value='911|6' >
    <INPUT type=CHECKBOX name='markets' value='911|6' >
    <INPUT type=CHECKBOX name='markets' value='911|6' >
    <INPUT type=CHECKBOX name='markets' value='911|6' >
    <INPUT type=CHECKBOX name='markets' value='911|6' >
    <INPUT type=CHECKBOX name='markets' value='911|6' >
    </form>

  • Problem with index.jsp and JSF

    hi all
    I have an index page "index.jsp" in the root directory of deployed project and in that page there is just a <jsp:forward> tag:
    <jsp:forward page="pages/mainPage.jsf" />I am using facelets and I have a template.xhtml
    when I run the browser nothing will be desplayed. by looking at Tomcat console, it seems that it renders the template.xml. if I place the path of the page directly in the address bar of browser, everything is OK
    http://localhost:8080/myproject/pages/mainPage.jsf
    but if I put following, it doesnt work.
    http://localhost:8080/myproject/
    I set the welcome-page to index.jsp in web.xml, and my pages are located in a directory namely "pages"
    any help will be appreciated.
    regards
    Mohammad

    I'm not sure what the problem is exactly. This topic might help though:
    http://forum.java.sun.com/thread.jspa?threadID=696586
    Be sure to read right to the bottom. You may be able to try a couple other things.
    Hope this helps,
    CowKing

  • Problem with including types into other type...

    Hi Experts,
    here i ve created 2 table types like:
    TYPES: BEGIN OF t_pr_ps_rpsco,
          pspnr1 LIKE prps-pspnr,
          posid  LIKE prps-posid,
          abgsl LIKE prps-abgsl,
          pspid LIKE proj-pspid,
          pspnr LIKE proj-pspnr,
    END OF t_pr_ps_rpsco.
    DATA: it_pr_ps_rpsco TYPE STANDARD TABLE OF t_pr_ps_rpsco WITH HEADER LINE,
          wa_it_pr_ps_rpsco TYPE t_pr_ps_rpsco.
    TYPES: BEGIN OF i_copy,
    include above type ( t_pr_ps_rpsco )
          projn LIKE afvc-projn,
          vornr LIKE afvc-vornr,
          pspel LIKE aufk-pspel,
          aufnr LIKE aufk-aufnr,
      END OF i_copy.
    how to add my above type into below.
    Rgds,
    sudeer.

    Hi Kumar,
    You can do this way.
    types: begin of t_pr_ps_rpsco,
            pspnr1 like prps-pspnr,
            posid like prps-posid,
            abgsl like prps-abgsl,
            pspid like proj-pspid,
            pspnr like proj-pspnr,
    end of t_pr_ps_rpsco.
    data: it_pr_ps_rpsco type standard table of t_pr_ps_rpsco with header
    line,
    wa_it_pr_ps_rpsco type t_pr_ps_rpsco.
    types: begin of i_copy,
            pr_ps_rpsco type t_pr_ps_rpsco,
            projn like afvc-projn,
            vornr like afvc-vornr,
            pspel like aufk-pspel,
            aufnr like aufk-aufnr,
    end of i_copy.
    Regards
    Raja.

Maybe you are looking for

  • Set maximum of stepper unit off of cell

    I would like to set the maximum range of a cell with stepper buttons by referencing another cell. In other words, if cell J10 contains the value "15", then the range for the stepper in cell K10 would be "0-15".

  • NullPointer Exception

    Hi, When I am reading the model node element, it is throwing error since there is no value from model. But ! I want read the model node element whether it is having value or not so based on that I can assign the value to value node.  but ! it is thro

  • Please help me regarding Secure RMI Applet Application

    Hi Friends.. Currently i use Java Card 2.2.1.. I'm learning about SecureRMIDemo application that shipped with JCDK 2.2.1.. Assume that i've loaded the SecureRMIApplet.cap successfully, and i've created the Secure RMI Client using SmartCardIO.. And th

  • Essbase Studio query

    Hi All, In my project i have a requirement of calculating date difference for measures which is not supported in Essbase studio. To do that I need to create a user defined table and define the sql query. As I have vast number of measure column in my

  • While itunes is downloading an error pops up saying...

    "There is a problem with this windows installer package A program required for this install to complete could not be run contact your personnel or package vendor". How do I fix this?