HtML inside JSP Tag

How much HTML can be inside a JSP Tag? I created a tag which set few variables. Now on the JSP page, if the variable A is not null, then only display value and show a link next to it.
So is it OK, if I take the link html (href code) and concatenate with the vale of A
Thanks in advance

<ed:TableIterator resultId="calist">
  <tr class="altrow">
    <td class="center" style="vertical-align:top;">
      <input type="checkbox" onchange="ca.value='1';" class="cb" name="cadel" value="<ed:getColumn column="idx"/>"/>
      <input type="hidden" name="cadate" value="<ed:getColumn column="date"/>"/>
    </td>
    <td style="vertical-align:top;">
      <input type="text" onchange="ca.value='1';" class="text" name="caoms" value="<ed:getColumn column="title"/>"/>
    </td>
    <td>
      <textarea class="text" onchange="ca.value='1';" name="camemo" cols="40" rows="4"><ed:getColumn column="memo"/></textarea>
    </td>
  </tr>
</ed:TableIterator>Loads :)
This is a small sample, building the rows of a table with 3 columns (a checkbox, an inputfield and a textarea) for each row.
I've built larger structures where I nest the same tags to create select controls in each row.
I wouldn't actually create HTML inside the java class for the tag, as that violates the separation of code and presentation (that's not to say I haven't done it, but I've learned better since <GRIN> and now try to avoid it where possible and minimise it where not).

Similar Messages

  • Deferred expressions inside JSP tags

    Hello!
    I want to include custom JSP 2.0 tag into page.
    Something like
    <!-- Page.jsp -->
    <jsp:root version="2.0"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:jsp="http://java.sun.com/JSP/Page"
        xmlns:pk="urn:jsptagdir:/WEB-INF/tags">
        <jsp:directive.page language="java"
            contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" />
    <f:view>
    <pk:custTag bean="${beanInstance}"/>
    </f:view>
    </jsp:root>inside that tag I want to access my bean in JSF 1.2 way:
    <!-- custTag.tag -->
    <jsp:root version="2.0" xmlns:h="http://java.sun.com/jsf/html">
    <jsp:directive.tag body-content="empty" language="java"
            pageEncoding="ISO-8859-1" />
    <jsp:directive.attribute name="bean" required="true" type="com.my.Bean"/>
    Runtime way:
    ${bean}
    ${bean.prop}
    Deferred way:
    <h:outputText value="#{bean}"/>
    <h:inputText value="#{bean.prop}"/>
    </jsp:root>So ${} renders as expected, but <h:outputText> renders nothing as #{} evaluates to null. What should I do to make outputText and inputText work, if that's possible at all?
    I use Tomcat 6.0.2 and JSF-RI 1.2_03.
    Thanks,
    Alexey

    Oh, I see now.
    But is there a way to trick JSF by explicitly putting bean into request scope? Something, like Tomahawk's aliasBean?
    Actually, I did try to implement it. The following code was supposed to create a variable in EL-context:
    ValueExpression     expr = _value instanceof ValueExpression
                       ? (ValueExpression)_value
                       : facesContext.getApplication().getExpressionFactory().createValueExpression(_value, Object.class);
    ELContext   ctxt = facesContext.getELContext();
    VariableMapper varMap = ctxt.getVariableMapper();
    if ( varMap == null ) {
        ((ELContextImpl)ctxt).setVariableMapper( new VariableMapperImpl() );
        varMap = ctxt.getVariableMapper();
    if ( varMap != null ) {
        varMap.setVariable(_alias, expr);
        _active = true;
        log.fine("makeAlias: " + _alias + " = " + expr.getExpressionString());
    } else {
        log.warning("makeAlias: " + _alias + " = " + expr.getExpressionString() + " failed");
    }But resolving #{...} still returned null.

  • Jsp tags in .html pages

    Hi
    Is possible to put jsp tags in pages .html?
    I try this example:
    <html>
    <head>
    <title></title>
    </head>
    <%
    out.print("teste");
    %>
    <body>
    </body>
    </html>
    and the result in the page is the jsp code. Tomcat don't print "teste", print out.print("teste");.
    Is possible to do this.
    Thanks in advance.
    Lu�s Matos

    What do you expect to happen? Who would you expect to print anything? Your browser is the only instance that reads HTML, and it's not a servlet container. JSPs have to be compiled and executed by such a container like Tomcat.

  • How html textfield use i jsp tag

    hi master
    sir see my php code i get input in name and fname text box and pass in php tag for insertion into database
    <html>
    <body>
    <form action="mfa.php" method="post">
    First Name<input type="text" name="fname">
    Second Name<input type="text" name="lname">
    <input type="submit" name"Insert">
    </form>
    <?php
    //Inserting records into database
    $firstname=$_POST['fname'];
    $lastname=$_POST['lname'];
    mysql_connect("localhost","root","") or die(mysql_error());
    mysql_select_db("test1");
    mysql_query("INSERT INTO persons (Firstname, Lastname) VALUES ('$firstname','$lastname')");
    echo "Data Inserted";
    ?>
    <?php
    //showing resutls in browser
    mysql_connect("localhost", "root", "") or die(mysql_error());
    mysql_select_db("test1") or die(mysql_error());
    $result = mysql_query("SELECT * FROM persons") or die(mysql_error());
    echo "<table border='1'>
    <tr>
    <th>First Name</th>
    <th>Last Name</th>
    </tr>";
    while($row = mysql_fetch_array( $result ))
    echo "<tr>";
    echo "<td>" . $row['Firstname'] . "</td>";
    echo "<td>" . $row['Lastname'] . "</td>";
    echo "</tr>";
    echo "</table>";
    ?>
    </body>
    </html>
    how i use html text box and pass to jsp tag for insertion data into database
    please give me sample code
    thank's
    aamir

    I have never had any problems mixing straight HTML (without the verbatim tag) and JSF tags. OTOH, I use facelets, not JSPs, so my experience may not be applicable.

  • JSP tag for reducing the html output

    Hello,
    I was wondering if there was a jsp tag that reduce the html output of the jsps. I have tried trimfilter the idea is great but at my project filters should be a subclass of one class that i cant edit.
    Thanks for all advices.

    Instead of this<html>
         <body>
              Hello World
              <!--Some html comment-->
         </body>
    </html>This would be better.<html><body>Hello World</body></html>Edited by: mehmetcadirci on Jul 17, 2010 1:19 PM

  • How to add raw HTML tags inside JSF tags...

    Hi
    I would like to use <input type = text > inside my project in some area..The following code hides the input = type html tag and forwards the click event to jsf command button...After selecting the file,it should forward the value to jsf textfield....
    My code seems as below.
    <h:form id="detailForm" onsubmit="printElements(detailForm,this)">
    <f:verbatim>
    <input id="uploadFile" type="file" style ="dispaly:none"size="100" />
    </f:verbatim>
    <h:inputText id="docName" style="width:650px;" maxlength="100"/>
    <h:commandButton id="visibleBrowseButton" value="Select File..." onclick="'detailForm:uploadFile'.click();callClick();">
    </h:commandButton>
    </h:form>
    <script type="text/Javascript">
    function callClick()
    var val = document.detailForm.uploadFile.value;
    document.getElementById('detailForm:docName').value = val;
    </script>
    While running this page it works fine in IE but in Mozilla firefox it troubles me during detailForm:uploadFile'.click().
    I suspect the jsf page cannot able to detect the raw html tag inside jsf tags...Eventhough i tried using inside<f:verbatim> it wont works..
    I would like to know
    1.Whether the code is right,,if the code goes wrong why it got runned in IE not in firefox....
    2.How can raw html tags can be integrated inside JSF tags....

    First of all, why are you ignoring valuable answers about a JSF fileupload component in your previous topic?
    Second, you can just nest raw HTML anywhere in your JSF page. Your problem is rather related to JavaScript. It has completely nothing to do with Java nor JSF. Learn JavaScript -there is a nice tut at w3schools.com- and look for a JavaScript forum if you still stucks. There are ones at webdeveloper.com and dynamicdrive.com.
    The f:verbatim is only required if you was using JSF 1.1 or older, which is not the case. You would have occurred completely different problems.

  • Calling methods from inside a tag using jsp 2.0

    My searching has led me to believe that you cannot call methods from in the jsp 2.0 tags. Is this correct? Here is what I am trying to do.
    I have an object that keeps track of various ui information (i.e. tab order, whether or not to stripe the current row and stuff like that). I am trying out the new (to me) jsp tag libraries like so:
    jsp page:
    <jsp:useBean id="rowState" class="com.mypackage.beans.RowState" />
    <ivrow:string rowState="${rowState}" />my string tag:
    <%@ attribute type="com.mypackage.beans.RowState" name="rowState" required="true" %>
    <c:choose>
         <c:when test="${rowState.stripeToggle}">
              <tr class="ivstripe">
         </c:when>
         <c:otherwise>
              <tr>
         </c:otherwise>
    </c:choose>I can access the getter method jst fine. It tells me wether or not to have a white row or a gray row. Now I want to toggle the state of my object but I get the following errors when I try this ${rowState.toggle()}:
    org.apache.jasper.JasperException: /WEB-INF/tags/ivrow/string.tag(81,2) The function toggle must be used with a prefix when a default namespace is not specified
    Question 1:
    Searching on this I found some sites that seemed to say you can't call methods inside tag files...is this true?...how should I do this then? I tried pulling the object out of the pageContext like this:
    <%@ page import="com.xactsites.iv.beans.*" %>
    <%
    RowState rowState = (RowState)pageContext.getAttribute("rowState");
    %>I get the following error for this:
    Generated servlet error:
    RowState cannot be resolved to a type
    Question 2:
    How come java can't find RowState. I seem to recall in my searching reading that page directives aren't allowed in tag files...is this true? How do I import files then?
    I realized that these are probably newbie questions so please be kind, I am new to this and still learning. Any responses are welcome...including links to good resources for learning more.

    You are correct in that JSTL can only call getter/setter methods, and can call methods outside of those. In particular no methods with parameters.
    You could do a couple of things though some of them might be against the "rules"
    1 - Whenever you call isStripeToggle() you could "toggle" it as a side effect. Not really a "clean" solution, but if documented that you call it only once for each iteration would work quite nicely I think.
    2 - Write the "toggle" method following the getter/setter pattern so that you could invoke it from JSTL.
    ie public String getToggle(){
        toggle = !toggle;
        return "";
      }Again its a bit of a hack, but you wouldn't be reusing the isStriptToggle() method in this way
    The way I normally approach this is using a counter for the loop I am in.
    Mostly when you are iterating on a JSP page you are using a <c:forEach> tag or similar which has a varStatus attribute.
    <table>
    <c:forEach var="row" items="${listOfThings}" varStatus="status">
      <tr class="${status.index % 2 == 0 ? 'evenRow' : 'oddRow'}">
        <td>${status.index}></td>
        <td>${row.name}</td>
      </tr>
    </c:forEach>

  • Servlet with no dynamic code inside jsp pages

    Hello,
              I saw that a servlet is created even if there is no dynamic code inside jsp pages (scriplets & tags). Is it possible to avoid it on bea side ? (I am using portal 8).
              By the way, do you know if is it possible to define apache in order to avoid to send to bea the jsp which have no dynamic code inside ?
              thank you !

    JSP's always generate a servlet on all web containers. Apache/Tomcat is no
              different. If you have static content, make it an HTML page.
              Bill
              "hournon jc" <[email protected]> wrote in message
              news:22255787.1103297053148.JavaMail.root@jserv5...
              > Hello,
              >
              > I saw that a servlet is created even if there is no dynamic code inside
              jsp pages (scriplets & tags). Is it possible to avoid it on bea side ? (I am
              using portal 8).
              >
              > By the way, do you know if is it possible to define apache in order to
              avoid to send to bea the jsp which have no dynamic code inside ?
              >
              > thank you !
              

  • Why does people use JSP Tag for their JSP page? (Urgent)

    I don't know what benifit if I am using JSP Tag.
    If anyone knows, pls give me an idea and the advantage of using JSP Tag in JSP Page!
    Thanks in advance!

    You have to read a little about JSP, JSP stands for JavaServer Pages, you can use jsp tags and you can use java code. If you dont want to use jsp tags then you should just write html file, if you just want to use java, then write java class or a servlet.
    The need for jsp arised because people were inserting html code inside a servlet class..a big no no..and a headache. JSP separate model from the view...read a little about MVC-2 model view controller pattern.
    Also read some tutorial on this website...good luck
    K

  • JSP Tag -- Including a JSP fragment in a Java Tag file

    Hi all,
    I have a query regarding JSP Tag file authoring by extending the TagSupport class. I would like to know if it is possible to include a JSP file fragment inside a Java file somehow.
    Specifically, I have created a simple template tag, which adds a header and footer template to the resulting HTML page.
    <bc:template>
    Hello World!
    </bc:template>produces for example
    <html><body>
    Hello World!
    </body></html>Now I have two JSP fragment files (head.jspf and foot.jspf), and I want to do do something like
    public class HtmlTemplateTag extends TagSupport implements TryCatchFinally {
      public int doStartTag() {
        // somehow include head.jspf
        return EVAL_BODY_INCLUDE;
      public void doFinally() {
        // somehow include foot.jspf
    }Which means, I want to execute had.jspf and foot.jspf from the Java class file. I am not sure if it is even possible. If anyone can help me with this, it would be greatly appreciated.
    thanks
    nilesh

    Your intention is to put a header/footer on pages in your web application?
    There is another way to do it - specify prelude/coda jsp fragments in web.xml
    Something like the following:
    <jsp-config>
      <jsp-property-group>
        <url-pattern>*.jsp</url-pattern>
        <include-prelude>/WEB-INF/jspf/head.jspf</include-prelude>
        <include-coda>/WEB-INF/jspf/foot.jspf</include-coda>
      </jsp-property-group>
    <jsp-config>

  • XML to convert creative html to jsp?

    I am trying to find a way to use XML, XSL, etc., to make the process of building web pages at my company easier between the creative team and developers:
    1.) The creative team creates the images, text, and html (using Dreamweaver). Please note, the creative team barely knows html, much less xml, xsl, or taglibs.
    2.) The creative team then sends me the html pages.
    3.) I then need to "convert" the html into jsps. That is, I remove the mock/dummy dynamic content, and replace it with the scriptlets or taglibs that will produce the real dynamic content.
    This takes alot of time. On top of that, if the creatives ever need to be changed, I need to send the newly converted jsps back to the creative team. They inevitably mess the jsps up, because they do not understand scriptlets or taglibs. Is there some standard way of dealing with this scenario, so that the creative team and I can work better together, and so that I dont constantly "convert" the html pages to jsps? I know one option is Enhydra's xmlc, but I will have a hard time getting the creative team to adopt that.
    thank you,
    David

    y don't u eliminate your jsp from your HTML. you can inculde html files as a header and footer.
    tell to write a comment tag in html <Html code> <table><tr><td> <!--jsp output--></td></tr></table> <Html code>. you can write a small jsp which can String.indexOf("<!--jsp output-->");. you can easily create header and footer files. for your jsp, u can also change your jsp code like this.

  • Help needed in jsp tags

    I am trying to design a view page that retrieves records from database,as the data may contain tags like<p>,<b> I am using encodeHtmlTag function to display them as it is .but some text needs to be appeared in bold but if i give the same,b. as input while viewing it is displayed as",b>" since i am using encodeHtmlTag it encodes all the tags .How i can solve this issue.?
    as a way i tried using "[ " b " ]" as the tag for bold option ,but i am not able to write proper function to recognize that charater and change that tag to ",b>".
    can anyone please help me in this.

    Thanks a Lot.Since I am at my beginning phase of jsp i am not able to I will be more thankful to you if recode my following code so that the bold option works fine with Italics.
    with the following code it encodes all the"<" characters so that if i want to make some part of text as bold while retrieving from database its not working how i can achieve this with the following codes.(r34.jsp).
    j11.jsp is the index page from which it forwards to next page r34.jsp which is the display page i.e it retrieves data from database and displays them.i need help in this page only.
    j11.jsp:
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="java.sql.*,java.util.*"%>
    <% 
    StringBuffer cname = new StringBuffer();
    StringBuffer pname = new StringBuffer();
    String nn ="\n\n";
    String body1="null";
    int cnamesize=0;
    int pnamesize=0;
    Vector nnn = new Vector();
    Vector nnp = new Vector();
    Vector nn1 = new Vector();
    String selectedclient="null";
    String prjname1,prjid;
    String xname = request.getParameter("client")!=null?request.getParameter("client"):"";
    //String xname1 = request.getParameter("pname1")!=null?request.getParameter("pname1"):"";
    String xname2 = request.getParameter("prjid")!=null?request.getParameter("prjid"):"";
    //session.setAttribute("prjnamerec", xname1);
    %>
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
        <title>Select the Client</title>
        <script language="javascript">
          function calljsp(){
            document.forms[0].action='r34.jsp';
         </script>
      </head>
      <body background="rlogo1.bmp">
        <img src="rheader.bmp" width="990" height="150"></img>
      <center>
      <h2>Login Department</h2>
      </center>
        <form name="clientselection" method=post>
         <h2>Client Selection </h2>
         <table>
            <tr>
                  <marquee><%=xname%></marquee>
              <td>Client :
                <select name="client">
                  <option value="">SELECT</option>
                  <%  try{
                  Class.forName("com.mysql.jdbc.Driver");
                  Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3307/r", "root", "root");
                  Statement statement = connection.createStatement();
                  ResultSet rs = statement.executeQuery("select client from client");
                  while(rs.next())
                      String cname1 = rs.getString(1);
                      nnn.addElement(cname1);
                  int j1 = nnn.size();
                  for(int x = 0;x<j1;x++){
                  String clientName = nnn.elementAt(x)+"";
                  %>
                  <option value="<%= clientName %>">
                    <%=   clientName %>
                  </option>
                  <%  }%>
                </select>
                <input type="submit" value="View Projects"/>
              </td>
            </tr>
          </table>
          <% 
          if(request.getParameter("client")!=null){
                  ResultSet rs1 = statement.executeQuery("select distinct(proj_name),proj_id from projects where client='"+xname+"'");
                  while(rs1.next()){
                    nn1.addElement(rs1.getString(1));
                    nnp.addElement(rs1.getString(2));
          pnamesize=nn1.size();
          for(int p = 0;p<pnamesize;p++){
              prjname1=nn1.elementAt(p)+"";
              prjid=nnp.elementAt(p)+"";
          %>
          <table>
            <tr valign="top" colspan="2">
              <td>
                <br/>
                 <input type="radio" name="prjid"  value="<%=prjid%>"><%=prjid%> &nbsp&nbsp <b><%= prjname1%> </b>
                 <input type="submit" value="Go" onClick="calljsp()"/>
              <br/>
              </td>
            </tr>
          </table>
          <% if(request.getParameter("pname1")!=null){
               //ResultSet rs2 = statement.executeQuery("select * from csrmail where prjname='"+xname1+"'  ");
                 // while(rs2.next()){
            }%>
          <%}%>
         <%}%>
         <% connection.close();
          }catch(SQLException e){
            e.printStackTrace();
          %>
        </form>
      </body>
    </html>
    r34.jsp
    <%!String encodeHtmlTag(String ma){
                                int malength= ma.length();
                          StringBuffer mailbuffer=new StringBuffer();
                              for(int m=0;m<malength;m++)
                               char c=ma.charAt(m);
                                  if(c=='<')
                                      mailbuffer.append("<");
                                  else if(c=='>')
                                       mailbuffer.append(">");
                                   else if(c=='&')
                                       mailbuffer.append("&");
                                    else if(c=='"')
                                       mailbuffer.append(""");
                                    else if(c==' ')
                                       mailbuffer.append(" ");
                                      else if(c=='\n')
                                       mailbuffer.append("<br>");
                                        else if(c=='[')
                                                  c = ma.charAt(m+1);
                                               if(c=='/')
                                                  c=ma.charAt(m+2);
                                                  char d= ma.charAt(m+3);
                                                  if(c=='b'&& d==']')
                                                       mailbuffer.append("</b>");
                                                    m=m+4;
                                                  else if(c=='I'&& d==']')
                                                         mailbuffer.append("</I>");
                                                        m=m+4;
                                                      c = ma.charAt(m);
                                                       if(c=='[')
                                                       c = ma.charAt(m+1);
                                                       if(c=='/')
                                                             c=ma.charAt(m+2);
                                                           char d2= ma.charAt(m+3);
                                                          if(c=='b'&& d2==']')
                                                              mailbuffer.append("</b>");
                                                            m=m+4;
                                              else if(c=='b')
                                               if(ma.charAt(m+2)==']')
                                                    mailbuffer.append("<b>");
                                               m=m+3;
                                               else if(c=='I')
                                               if(ma.charAt(m+2)==']')
                                                    mailbuffer.append("<I>");
                                               m=m+3;
                                             c=ma.charAt(m);
                                              mailbuffer.append(c);
                                      else
                                       mailbuffer.append(c);
                                    return mailbuffer.toString();
                                  }%>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="java.sql.*,java.util.*,import java.util.StringTokenizer"%>
    <%
    String xname = request.getParameter("client")!=null?request.getParameter("client"):"";
    //String xname1 = request.getParameter("pname1")!=null?request.getParameter("pname1"):"";
    String xname2= request.getParameter("prjid")!=null?request.getParameter("prjid"):"";
    Vector nnn = new Vector();
    Vector nn1 = new Vector();
    Vector nn2 = new Vector();
    Vector nn3 = new Vector();
    Vector nn4 = new Vector();
    Vector nn5 = new Vector();
    //Vector nn6 = new Vector();
    StringBuffer sb = new StringBuffer();
    StringBuffer redt=new StringBuffer();
    StringBuffer qudt=new StringBuffer();
    StringBuffer retime=new StringBuffer();
    StringBuffer qutime=new StringBuffer();
    //StringBuffer nn6=new StringBuffer();
    StringTokenizer stok1 ;
    String cquery="null";
    String creply="null";
    String cqdate="null";
    String mdate="null";
    String crdate="null";
    ResultSet rs=null;
    ResultSet rs1=null;
    %>  
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
        <title>Records Display</title>
          <script language="javascript">
             function calljsp1(){
                    document.forms[0].action='j11.jsp';
         </script>
      </head>
      <body background="rlogo1.bmp">
       <img src="rheader.bmp" width="990" height="150"></img>
        <form name="RecordsDiplay" method=post>
                  <%String thisclntname12 = xname;%>
                  <%//String thisprjname12 = xname1;%>
                  <%String thisprjid12 = xname2;%>
                    <%//out.println(thisprjname12);%>
                <b>ProjectID :</b>
                    <%out.println(thisprjid12);%>
                     <table bgcolor="rgb(206,206,255)">
            <tr>
              <td>
                      <br>
                         <br>
                  <%
                    try
                        //String thisprjname = xname1;
                         String thisclntname = xname;
                         String thisprjid = xname2;
                         Class.forName("com.mysql.jdbc.Driver");
                         Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3307/r", "root", "root");
                         /*Statement statement = connection.createStatement();
                         ResultSet rs = statement.executeQuery("select mails,mdate from csrmail where proj_id='"+thisprjid+"' ");*/
                   PreparedStatement ps=connection.prepareStatement("select mails,mdate from csrmail where proj_id=?");
                   ps.setString(1,thisprjid);
                   ps.executeQuery();
                   rs=ps.getResultSet();
                         while(rs.next())
                            String cname1 = rs.getString(1);
                            String mdatte = rs.getString(2);
                            nnn.addElement(cname1);
                            nn5.addElement(mdatte);
                           int j1 = nnn.size();
                           for(int x = 0;x<j1;x++)
                              StringBuffer mmdt=new StringBuffer();
                              StringBuffer mmtime=new StringBuffer();
                              String mdt1 =  nn5.elementAt(x)+"";
                              String mdt=mdt1.substring(8,10);
                              String mmonth=mdt1.substring(5,7);
                              String myear=mdt1.substring(0,4);
                              String mhh=mdt1.substring(11,13);
                              String mmm=mdt1.substring(14,16);
                              String mss=mdt1.substring(17,19);
                              mmdt.append(mdt+"-"+mmonth+"-"+myear);
                              mmtime.append(mhh+":"+mmm+":"+mss);
                              String mails1 = nnn.elementAt(x)+"";
                      %>
                            <b>Mail Posted Date</b>
                               <%out.println(mmdt);%>
                            <b>Mail Posted Time :</b>
                               <%out.println(mmtime);%>
                            <br>
                            <br>
                            <b>  <style="font-family:verdana;font-size:80%;color:EE82E">Mail :  </b>
                               <%out.println(encodeHtmlTag(mails1));%>
                            <br>
                      <br>
                       <%}%>
                        </table>
            </tr>
              </td>  
                       <br>
                        <%/*ResultSet rs1 = statement.executeQuery("select * from csrquery where proj_id='"+thisprjid+"' ");*/
            PreparedStatement ps1=connection.prepareStatement("select * from csrquery where proj_id=?");
                   ps1.setString(1,thisprjid);
                   ps1.executeQuery();
                   rs1=ps1.getResultSet();
               while(rs1.next())
                          cquery = rs1.getString(2);
                          cqdate = rs1.getString(4);
                          creply=rs1.getString(5);
                          String nd = "No Reply";
                          crdate = rs1.getString(7);
                            if(rs1.wasNull())
                               nn4.addElement(nd);
                             else
                                nn4.addElement(crdate);
                          nn1.addElement(cqdate);
                          nn2.addElement(cquery);
                          nn3.addElement(creply);
                          int q=nn1.size();
                            for(int j=0;j<q;j++)
                                {%>
                    <%//out.println(thisprjname12);%>
                   <b>ProjectID :</b>
                    <%out.println(thisprjid12);%>
                   <br>
                   <br>
                                 <% String qudt1 = nn1.elementAt(j)+"";
                                  String cqdtt=qudt1.substring(8,10);
                                  String cqmonth=qudt1.substring(5,7);
                                  String cqyear=qudt1.substring(0,4);
                                  String cqhh=qudt1.substring(11,13);
                                  String cqmm=qudt1.substring(14,16);
                                  String cqss=qudt1.substring(17,19);
                                  qudt.append(cqdtt+"-"+cqmonth+"-"+cqyear);
                                  qutime.append(cqhh+":"+cqmm+":"+cqss);
                                  String qu = nn2.elementAt(j)+"";
                                 String re = nn3.elementAt(j)+"\n\n";
                                  String b= qu;
                                 String b1 = re;
                              stok1 = new StringTokenizer (re,"\n");
                                //System.out.println(creply);
                                  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(encodeHtmlTag(b));
                               %>
                         </td>
                       </tr>
                     </table>
                             <br>
                                <table>
                                <tr bgcolor="rgb(174,174,200)">
                                 <td>
                                   <b>Last Reply Posted Date</b>
                               <%out.println(redt);%>
                                   <b>Last Reply Posted Time :</b>
                               <%out.println(retime);%>
                                   <br>
                                 <%
           while(stok1.hasMoreTokens())
             out.println(encodeHtmlTag(stok1.nextToken()));%>
             <br>
         <% }
                                    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>
                    <br>
    </td>
                       </tr>
                     </table>
                  <% }
              connection.close();
            }catch(SQLException e)
            e.printStackTrace();
          %>
          <input type="submit"  value="Back" onClick="calljsp1()"/>
        </form>
      </body>
    </html>

  • Create frames using JSP tags

    I am trying to create two frames in my JSP page . However it just displays a blank page on execution.
    I am using following code to create frames:
    <hbj:content id="myContext" >
          <hbj:document>
         <hbj:documentHead>    
         <frameset cols="100,*" border=1 frameborder="1">
                     <frame name="frame1"
                            src ="http://www.yahoo.com">
                     <frame name="frame2"
                            src= "http://www.google.com">
                </frameset>
         <hbj:documentHead>            
        </hbj:document>   
    </hbj:content>
    Thanks

    Neeti,
       Just get rid of JSP tags and put the frameset html on jsp page. It should work without JSP tags.
    <html>
    <frameset cols="100,*" border=1 frameborder="1">
    <frame name="frame1"
    src ="http://www.yahoo.com">
    <frame name="frame2"
    src= "http://www.google.com">
    </frameset>
    </html>
    Message was edited by: Prakash  Singh

  • JSP tags for managing MBeans??

    Hi,
    I'm trying to build a GUI for managing a custom MBean. The MBean implementation is a wrapper for a singleton class (specifically, a Configuration class for a web app). I've tried using WebJMX, but the problem there is that it relies heavily on MX4J, and has not kept up with JMX advances in the last two years (MX4J is a bit ahead of weblogic 8.1).
    Just as there is a set of console extension jsp tags, I suspect that a set of JSP tags exists for the developers of the Weblogic console to write their JSP pages to manage the weblogic MBeans. I coud just try to figure out the pattern of the INPUT and FORM tags in the html, but that leaves me with a possibly-inaccurate, version-dependent, non-dynamically-generated page to manage one MBean.
    Does such a set exist? Could someone point me to any information about how to use such a set of tags?
    I would like to be able to have the JSP I use for my console extension display an interface for modifying MBean configurable fields and executing MBean operations. What would the best way be to do this? I do not want to embed the Sun JMX RI in my web-app and launch a separate HtmlAdaptor listening on a different port. I would like the admin to the MBean be accessible through (and only through) the weblogic console.
    Thanks in advance for the help,
    Matt Geis

    Hi,
    I'm trying to build a GUI for managing a custom MBean. The MBean implementation is a wrapper for a singleton class (specifically, a Configuration class for a web app). I've tried using WebJMX, but the problem there is that it relies heavily on MX4J, and has not kept up with JMX advances in the last two years (MX4J is a bit ahead of weblogic 8.1).
    Just as there is a set of console extension jsp tags, I suspect that a set of JSP tags exists for the developers of the Weblogic console to write their JSP pages to manage the weblogic MBeans. I coud just try to figure out the pattern of the INPUT and FORM tags in the html, but that leaves me with a possibly-inaccurate, version-dependent, non-dynamically-generated page to manage one MBean.
    Does such a set exist? Could someone point me to any information about how to use such a set of tags?
    I would like to be able to have the JSP I use for my console extension display an interface for modifying MBean configurable fields and executing MBean operations. What would the best way be to do this? I do not want to embed the Sun JMX RI in my web-app and launch a separate HtmlAdaptor listening on a different port. I would like the admin to the MBean be accessible through (and only through) the weblogic console.
    Thanks in advance for the help,
    Matt Geis

  • Custom JSP Tags for Weblogic

    Hi,
              I have several questions regarding this topic:
              1) Does Weblogic 5.1 supports Custom Tags ? If so, are there any known
              problems ?
              2) Does Weblogic come with any tag libraries (for loops, if, etc) and where
              can I get them ?
              3) Are there any tag libraries out there (JRun, for example) that have been
              successfully run on Weblogic ?
              Any help would be much appreciated.
              Thanks,
              Jamie
              

    As there seems to be general interest, a link would probably be a great
              help.
              Regards
              Daniel Hoppe
              -----Original Message-----
              From: Michael Girdley [mailto:[email protected]]
              Posted At: Friday, August 25, 2000 8:03 AM
              Posted To: jsp
              Conversation: Custom JSP Tags for Weblogic
              Subject: Re: Custom JSP Tags for Weblogic
              Please see the documentation:
              http://www.weblogic.com/docs51/resources.html
              Michael Girdley
              BEA Systems Inc
              "Jamie" <[email protected]> wrote in message
              news:[email protected]...
              > Update
              > =======
              >
              > Weblogic Portal has some Tag libraries. I've downloaded the trial
              version
              > of
              > the Weblogic Commerce Server. How do I get the tag libraries and use
              them
              > on WL 5.1 ?
              >
              > Answers to original post still wanted
              >
              > Thanks,
              >
              > Jamie
              >
              > Jamie <[email protected]> wrote in message
              > news:[email protected]...
              > > Hi,
              > >
              > > I have several questions regarding this topic:
              > >
              > > 1) Does Weblogic 5.1 supports Custom Tags ? If so, are there any
              known
              > > problems ?
              > >
              > > 2) Does Weblogic come with any tag libraries (for loops, if, etc)
              and
              > where
              > > can I get them ?
              > >
              > > 3) Are there any tag libraries out there (JRun, for example) that
              have
              > been
              > > successfully run on Weblogic ?
              > >
              > >
              > > Any help would be much appreciated.
              > >
              > > Thanks,
              > >
              > > Jamie
              > >
              > >
              >
              >
              

Maybe you are looking for

  • Sales BOM - Delivery Quantity check during post goods issue

    I am working on a problem in my company.  We are running ECC6.0 ehp 4.  We are using standard ERLA functionality with sales bom (5) for product kits.  Delivery manager has requested that we investigate a system check during delivery post goods issue.

  • Sub contract PO from sales order

    Hi, I want to create a sub cotract PO for material A from a sales order (a PR will be created from the sales order and linked to the sales order in VA01). The PO will have item category L and account assignment M. The issue with that is the component

  • Subtotal of quantity in cust wise sales register

    Hi Experts.................... please ref to the following query which provides customer wise sales register report, now what we require is sum total of quantity of a particular item code for particular customer e.g:- if on 01/04/09 customer A purcha

  • Hiding a page in a form

    Hi, I'm creating a 2 page form. One is a U.S. version and one is a Canadian version and I'm using radio buttons to toggle between the two versions. I want to have the US version be the page that is displayed first in PDF, with the Canadian version hi

  • Lumia 925 cc3065 not available in saudi arabia

    i recently got the lumia 925 and its ana amzing phone. However i have not been able to find any covers or cases for it in ksa. Even the official cc3065 is not available. Will it be available soon or are there any alternatives?