JSP tag for import

Hi,
I have a problem while trying to import java classes using
<jsp:directive.page import....... tag.
though the <%@page import = ....... tag works fine...
any help would be appreciated..

I can just tell you that this is not working.
Some of the XML JSP tags are simply not implemented by all servlet engines.

Similar Messages

  • Jsp tag for blog attribute in a flex asset

    hi Experts,
    I am using FW7.6.1, I have a flex asset with a blob attribute, when I create that flex asset, I can upload an image in that attribute, but I did not find a jsp tag for rendering that attribute which has a image saved, another question is what jsp tag should be used in case of a word file is uploaded in that attribute, that's to say:
    1. for a image, I want to display it in browser.
    2. for a word file, I want to show popup window to ask user if he wants to download or open.
    By using assetset:getattributevalues and render:stream, it's just for string type of attribute, not for blog.
    Thanks in advance.
    Best regards

    hi all,
    I got the answer from dev guide, seems should use:
    <blobservice:gettablename varname="uTabname"/>
    <blobservice:getidcolumn varname="idColumn"/>
    <blobservice:geturlcolumn varname="uColumn"/>
    and render:satelliteblob
    some complicated then I expected.
    Best regards

  • 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
              > >
              > >
              >
              >
              

  • 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

  • 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 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

  • Keyword tags for imported iPhone photos disappeared from LR5.7 catalog under OS 10.10.1Yosemite.

    I am using LR 5.7 on a Mac OS 10.10.1 with a Time Machine backup - the vast majority of my photos were taken on an iPhone 5 in the year 2014 and are in a folder on my computer internal hard drive.
    The structure is my Folders > Macintosh HD which has a folder inside called
    Pictures Users/myname with 1719 photos in it -
    when I click on this folder the following folders open up:
    > folder dated 1904(?) with 2 items
    > folder dated 2012 with 1 item
    > folder dated 2013 with 1 item
    > folder dated 2014 with 1352 items...
    .... and so on until
    >Exported Original Photos 365 (which are exports of photos from iPhoto that I wanted to catalog and develop in LR)
    The Maths are correct. But as for the tags:
    when I open the folder Pictures Users/myname containing 1719 photos and view them as thumbnails I see all the keywording applied to my collection of photos
    BUT when I open the folder Pictures - Users/myname and then folder 2014, I see a list:
    folder 2014 with 199 items
    folder 2014-01-20 with 1 item
    folder 2014-01-21 with 5 items
    etc
    All well and good.
    BUT if I open these dated folders with small numbers of images in them (never more than 50 per day), view the images in a grid and click on a photo, there are no keyboard tags to be seen in the information panel. They only time I see any keyword tags that I have entered is when I open Macintosh HD > Pictures - Users/myname which contains my entire library of photos taken in 2014 and those added to the catalog from iPhoto.
    Should I see tags for the photos in the individually dated folders e.g. Macintosh HD > Pictures - Users/myname > 2014 > 2014-01-20 and so on day by day ?
    I have been tagging my photos with keywords after my weekly import. And have been doing this after viewing each photo from the grid view of photos displayed by clicking on  Macintosh HD >Pictures - Users/myname.
    Have I made an error?
    I want to tag my collection of photos by the correct method before it grows in size.
    Many thanks
    David (Brighton, UK)

    Hi,
    I moused down on the "+" sign where it says Folders and "show photos in subfolders" was shown as already being "on".
    I followed your suggestion:  I tried to keyword the photo in Macintosh HD/Pictures - Users/myname/folder 2014-01-20 with 1 item however it did not permit me to type in a keyword in the keyboarding section panel on the left hand side, so I was unable to check if it stuck.
    I don't know whether this is important or not, but the list of folders, subfolders etc have slightly different arrow heads:
    If I drop down the Macintosh HD location there is a SOLID, grey downward pointing arrow to the left hand side of the folder Pictures - Users/myname/..
    However, if you drop down folders from Macintosh HD > Pictures - Users/myname/.. to show inner folders:
    Macintosh HD> Pictures - Users/myname/... > folders dated 2014-01-20 etc., then there is a horizontal triangle that is made up of grey dots rather than a solid triangle for every dated folder - is this as expected?

  • 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.

  • Object passing to weblogic JSP tags

    Hello everyone
              I was wondering if I can pass a java object to a weblogic jsp tag
              for example if I select a content object with id "newsItem"
              <cm:selectbyid contenthome="com.beasys.commerce.axiom.document.Document"
              contentid="<%= contentId %>"
              id="newsItem" />
              can I pass newsItem as a variable to the next tag
              i.e. instead of writing it
              <cm:printdoc id="newsItem" />
              I write it
              <cm:printdoc Id="<%= newsItem %>" />
              This results in an compiler error if the object is passed to Id that is
              waiting for a content instance, while if it is passed to contentid (as in
              the first
              script) then it works fine, as this is waiting for a string.
              Is it possible to pass an object to the "id" in the jsp script, and if not,
              is there a work around it that enables the content selection logic to be
              seperated from the display.
              Thank you
              May
              

    Oh...i put quotes around the values and that fixed it.
              <%@ page language="java" session="false" %>
              Happy Holidays,
              Brian
              "Brian Williams" <[email protected]> wrote in message
              news:[email protected]..
              > Hello,
              >
              > I have a JSP that does something strange: When I look
              > at it under Explorer it looks fine but under Netscape
              > it has this at the top of the page:
              >
              > <%@ page language=java session=false %>
              >
              > Actually, with Explorer you can see it in the view
              > source. What's up with Weblogic? It seems that
              > it failed to parse this JSP tag.
              >
              > Thanks,
              > Brian
              >
              >
              >
              

  • Hot deploying jsp tags

    Hi does anybody out there no how to hot -deploy non ejb classes .Like jsp
              tags for example? It is extremely to code them without a hot deployment
              ability.
              Thanks in advance
              Jeff Anderson
              

    Cameron,
              In general, what kind of "interesting bugs" and "design flaws" do you mean?
              I would expect that using any kind of cache can allow for bugs due to developers
              confusion... but are there inherent "bugs" (or design flaws) that are built into
              WL's Cache tag?
              Jack Lin
              Cameron Purdy wrote:
              > Install the latest SP. They are (relatively speaking) resource intensive.
              > However, properly implemented/used, this relative cost is close to 0.
              > (Instantiating a Java class and calling a few empty methods uses a couple
              > hundred clock cycles on a good JVM.) BTW Pooling is considerably more
              > expensive for simple objects than instantiating new ones. Also, due to
              > design flaws in the custom tag API, pooling JSP tags could lead to some
              > interesting bugs related to the lack of re-initialization.
              >
              > --
              >
              > Cameron Purdy
              > [email protected]
              > http://www.tangosol.com
              > WebLogic Consulting Available
              >
              > "Anthony Raiti" <[email protected]> wrote in message
              > news:39d4a35f$[email protected]..
              > We are researching JSP Tags as a method of seperating our creative and
              > coding efforts. Our research is showing that JSP tags is a resource hog and
              > noticed that none of the JSP Tags are being pooled. Docs that we have looked
              > at suggest that pooling does occur, but we do not see it happening. Is
              > anyone using this technology and if so how is the performance?
              

  • Problem with jsp tag in jsf file c:import

    <!-- <c:import url="#{backing_Home.whichMenu}"/>-->
    <jsp:include page="#{backing_Home.whichMenu}"/>
    I am trying to use a JSF variable in jsp tag
    I am getting error like this
    javax.servlet.jsp.JspTagException: /#{backing_Home.whichMenu}     at org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(ImportSupport.java:318)     at org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(ImportSupport.java:186)     at _Home_2e_jsp._jspService(Home.jsp:24) I want to add a page dynamically using that variable
    Is there any other method

    This code works fine for me:
    <%@ taglib uri="/jstl-c" prefix="c" %>
    <html>
         <body>
         <%
              int array[] = new int[] {1,2};
              session.setAttribute("array", array);
              String arrayNames[] = new String[]{"One", "Two"};
              session.setAttribute("arrayNames", arrayNames);
         %>
              <form action="?">
              <select name="select">
                   <c:forEach items='${ sessionScope.array}' var="row">
                        <c:choose>  
                             <c:when test="${param.select== row}"> >
                                  <option value="<c:out value='${row}'/>" selected><c:out value="${sessionScope.arrayNames[row-1]}"/></option>
                             </c:when>   
                             <c:otherwise>
                                  <option value="<c:out value='${row}'/>"><c:out value="${sessionScope.arrayNames[row-1]}"/></option>
                             </c:otherwise>
                        </c:choose>
                   </c:forEach>
              </select>
              <input type="submit" name="submit" value="submit"></input>
              </form>
         </body>
    </html>
    good luck.
    MatrixPooh
    www.bizdisplay.com

  • Importing classes that implement jsp tags

              I was making a custom JSP tag library. The tag functionality was implemented in
              a class called, lets cay ClassA. I made the tld file and put it under the WEB-INF
              directory. The class which implemented the functionality was placed under WEB-INF/classes
              directory. I had the imported the tag library using the taglib directive. I was
              getting an error which said "cannot resolve symbol". But when I in the JSP file
              I imported the class file which implemented the taglib functionality the error
              vanished. Is it necessary to import the class files even if the taglib is imported.
              The documentation does not say so. Or is there some configuration I have to make.
              

    I think was a side effect of the .jsp changing redeploys the web app in 6.0.
              When the web app was redeployed your directory structure was reread and thus
              it found your .tld.
              Sam
              "bbaby" <[email protected]> wrote in message
              news:3b422db7$[email protected]..
              >
              > I was making a custom JSP tag library. The tag functionality was
              implemented in
              > a class called, lets cay ClassA. I made the tld file and put it under the
              WEB-INF
              > directory. The class which implemented the functionality was placed under
              WEB-INF/classes
              > directory. I had the imported the tag library using the taglib directive.
              I was
              > getting an error which said "cannot resolve symbol". But when I in the JSP
              file
              > I imported the class file which implemented the taglib functionality the
              error
              > vanished. Is it necessary to import the class files even if the taglib is
              imported.
              > The documentation does not say so. Or is there some configuration I have
              to make.
              >
              >
              

  • Member variable for jsp tag

    Hi,
    is it safe to have member variables in jsp tag? every time service method will create new instance of tag?Thanks

    is it safe to have member variables in jsp tag? The answer is yes, but.
    every time service method will create new instance of tag?no, it will not necessarily create a new instance every time.
    For most tags I believe the spec allows for a 'pool' of tag handlers to be retained.
    Certainly I have seen this happen in tomcat.
    An exception is the JSP2.0 SimpleTagHandler which guaruntees that it will be used once and then thrown away.
    With other tags, you have ownership of the tag and its member variables, between doStartTag and doEndTag. Nothing else can interfere with the member variables.
    However if you include the tag twice in your page, one after another, it is quite possible, that you will be given the same tag object, and thus the member variables might have variables set from the previous use of the tag.
    It is fairly easy to work around though
    in the doStart: init any member variables that are not defined by attributes to be their default values
    in the doEnd method, clean up your member variables. Clear any attribute values that might be optional. Set things to null. That way you are guarunteed that if the tag is reused, it won't pick up any data from your run through here.
    But don't take my word for it :-) Try it out.
    Hope this helps,
    evnafets

  • Using scriplets in jsp-tag attribute

    I have a strange problem with a custom taglibrary that I'm trying to write.
    When I use the tag in a jsp like underneath the first outputs the right value (Welcome Hans), but the output of the second time shows: Welcome <%= test %>
    This is a part of the JSP:
    <% String test = "Hans"; %>
    <arto:hello name="Hans" />
    <arto:hello name="<%= test %>" />
    I realy don't know how to let the tag display the value of the string in my jsp.
    Can anyone give me some advice?
    Thanks,
    Hans
    The files are:
    import java.io.*;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    public class HelloTag extends TagSupport {
    private String name;
    public void setName(String name) {
    this.name = name;
    public int doStartTag() throws JspException {
    try {
    pageContext.getOut().print("Welcome " +name);
    } catch (IOException ioe) {
    throw new JspException("Error: IOException while writing to client");
    return SKIP_BODY;
    public int doEndTag() throws JspException {
    return SKIP_PAGE;
    The JSP:
    <%@ taglib uri="arto" prefix="arto" %>
    <%
    String test = "Hans";
    %>
    <arto:hello name="<%= test %>" />
    <arto:hello name="Hans" />
    The 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_1.dtd">
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.1</jspversion>
    <shortname></shortname>
    <uri></uri>
    <info></info>
    <tag>
    <name>hello</name>
    <tagclass>HelloTag</tagclass>
    <bodycontent>empty</bodycontent>
    <info>Tag with Parameter</info>
    <attribute>
    <name>name</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    </taglib>

    In the tld for the name attribute, use
    <rtexprvalue>true</rtexprvalue>
    This specifies that the attribute value can be a run-time expression. Otherwise, the value is taken as a literal.

  • 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>

Maybe you are looking for

  • Invoking asynchronous BPEL process from java ui

    Hi, I am invoking an asynchronous BPEL process from java ui. I read somewhere that i can obtain an instance handler uing the lookupInstance() method of class Locator using the conversation id provided by the class NormalizedMessage. My code looks lik

  • How to detect end of flash movie (SWF file) in Javascript

    I have used Dreamweaver CS4 to integrate my SWF file as shown below. So far so good. See GoToNext() my website What I wouldd like to do is have the SWF movie trigger a javascript function in my html page when the video is stopped playing (i.e. when i

  • CR2 files will not open in CS4 or Bridge.

    I can not open CR2 file in CS4 or Bridge. The CR2 images show in the preview window when I click the "open" button under "file". When I select the image to open I get "Unable to complete your request because it is not the right kind of document." I h

  • Photostream quit working on PC

    Running the iCloud Control Panel on a Win7-64 PC. Had the sync folder set up, and all photos from my iPhone 5 appeared beautifully in the PC folder, just as they were supposed to. I got an iPhone 6 a couple of months ago, and it seemed to sync just f

  • Song order rearranges in playlists

    I listen to music on my iPhone 4 (6.1.3 - not enough space to upgrade to ios7) when working out and traveling.  Recently I tried to change the order of songs in a couple of playlists and add new songs and the changes won't keep.  For instance when ed