ERROR USING HTML textarea with Java String

I have a form in HTML that has a textarea for input messages.
When user press submit, a java servlet gets the information and stores it in a Database as a String.
Later, I have a JSP thata retrieves that information from the database and put it as the value propertie of another textarea in the page so user can modify it if wanted, but I am having a hard time finding how to do so , because when I do the line:
<textarea .....bla bla.... value=
<%=some_string%>
.....bla >
and the some_string has more than one line ( e.g "\n" or "\r" caracteres ), I got an error when displaying the page. Can anyone help me with that please ???
Thanks.

here's my codes again for reference. hope it helps to rectify the matter
// edit.jsp
String search = (String)request.getParameter("txtSearch");
String parameter = (String)"%"+search+"%";
String sSQL = "select * from tblArticle where Title LIKE '"+parameter+"'";
<%
try {
while(Rs.next()) {
%>
<tr>
<td width="16%" height="157" align="center">Article:</td>
<td width="88%" height="157"><textarea rows="15" name="txtArt" cols="86" value="<%= txtArt %>"></textarea></td>
</tr>
</table>
<%
// .....

Similar Messages

  • How Can i use Html frames with  simple JSP???

    How Can i use Html frames with simple JSP???
    Actually i am creating an application in which i have used Index.html as frame.
    Noew i am trying that if i click on a link of one frame(say menu frame) the \result shoul come to some other frame(say frame named mainwindow).
    Hoe can i do like this???
    Anand Pritam

    Well i am using..
    < Base target="mainwindow">
    But it is no working is there some other way??

  • How to use MyFaces component with Java Creator 2

    Please advise for me the way to use Myfaces component with Java Creator 2. Thanks

    Apologies for the late reply, but currently what exists generally for MyFaces integration with Creator is on this blog:
    http://wiki.java.net/bin/view/Javatools/CustomComponentLibraries
    You might also want to post the same question on the nbusers alias on netbeans.org, referencing Visual Web Pack
    Regards,
    -Brad Mayer

  • How to use parameter file with java

    Is it possible to use a parameter file with Java, and is there any class/method to make it easy to call and use these parameter from a text file, other than scanning the whole text file manually as we can do normally with visual basic/c++, so we can call the program with the parameter file, like java testing c:\\testing.ini

    If I understand you correctly, you may be looking for a properties file. This is basically a text file that contains pairs of strings in the form:
    parameter1=value1
    parameter2=value2
    parameter3=value3
    ...etc.
    and the values are retrieved using the java.util.Properties class - see:
    http://java.sun.com/j2se/1.3/docs/api/java/util/Properties.html
    Sample use://Call chis method once, to load the props file.
    //props file is called "demo.properties", and is
    //in a directory that is included in the classpath
        private void loadMyProperties() throws Exception
         InputStream stream = getResourceAsStream("/demo.properties");
         if(stream == null)
             throw new Exception("stream is null!");
         demoProperties = new Properties();
         demoProperties.load(stream);
         stream.close();
    // Then you can retrieve properties in your code using:
    String param3 = demoProperties.getProperty("parameter3");
    //...etc

  • How to use html tags inside java

    I have to retrieve data from db and return the data to my index.jsp page.
    Its working fine.
    But I have o display in a pable format using html. How to embed html tags? I tried this way. Its not working. Any suggestions?
       String htmlOpen = "<html>";
        String htmlEnd = "</html>";
        String titleOpen ="<title>";
        String titleEnd ="</title>";
        String bodyOpen = "<body>";
        String bodyEnd = "</body>";
        for (int i = 1; i <= cols;i++){
            output = output + rsmd.getColumnName(i);
         while (rst.next()) {
            for (int i = 1; i <= cols;i++){
                      output = output +rst.getString(i);
      result = htmlOpen + titleOpen + titleEnd + bodyOpen + output+ bodyEnd + htmlEnd;
        stmt.close();
        conn.close();
         return htmlOpen;
      }

    See those charcters in your JSP that look like "<%"? Those characters mean: "the code after this is Java - interpret it as such".
    Then when you close your Java block with "%>", it then means: "the code after this is html - output it to the request response that is being built. However, within the html code, the syntax "<%= java_variable_name %>" means "take the current value of that Java variable and insert it into the html output".
    Here's an example:
    %>
    <table cellspacing="2" cellpadding="2" border="1">
    <tr>
    <%
        String s = null;
        for (int i = 1; i <= ncol; i++)
          s = rsmd.getColumnName(i);
    %>
      <th nowrap><A HREF="<%=sortLink.toString()%>&sortby=<%=s%>"><%= s %></th>
    <%
    %>
    </tr>
    <%
        if (rs == null || numRows <= 0)
          %><tr><td colspan="10" nowrap>No data available for specified query.</td></td><%
        else
          int rowCounter = 0;
          while(rs.next() && rowCounter < PAGE_SIZE)
            rowCounter++;
    %>
      <tr><%
            for (int i = 1; i <= ncol; i++)
              s = rs.getString(i);
              if (rsmd.getColumnName(i).equalsIgnoreCase("password"))
                    %><td nowrap>********</td>
    <%
              else
                %><td nowrap><%= s %></td>
    <%
            %></tr><%
    %>
    </table>This is JSP 101, what they teach in the first hour of class...
    Here's a decent JSP tutorial:
    http://www.jsptut.com/

  • How use PGP encription with Java

    Hello,
    Someone knows or have worked using in Java PGP
    encription ?
    I need to work with this, but, i need to know if exits
    *.jar for PGP in order to use in my Java code.
    Any help is greatly appreciated.
    -Angel

    here by is my code
    import java.sql.*;
    import java.io.*;
    import java.lang.Object;
    import java.util.*;
    import javax.naming.*;
    ////////Encyption Process
    ///////Track Pgp Message
    /////return the status  val to main
    class e4p_PgpEncryption
         private String userid="";//"[email protected]"
         private String fileName;// file to be encrypted
         private String filePath; // file path for the file to be encrypted
         private Runtime rt;
         private Process processCmd;
         private String batchId;//id from bachfile_details table
         private String processFile; // file name after taking care of space
         private String successString; // the string to be checked for success
         private int fileNotFoundErr; // if file not exit for encryption
         private int fileExistErr;
         private int ioExceptionErr;
         private String pgpReturnMsg; // net message from encryption process
         private int fileEncrytionFlag; // decide the encryption
         private int unableToAdduserid; // if key file can not be added in public key ring
         private int keyNotSigned; // if public key is not signed key
         private int pgpDbConnectionError;
         private int databaseUpdationErr;
         private int directoryErr;
         private String errMsg;
         private int encryptedFile=0;
         private String keyErrString;// string for matching error message
         private int keyErrFlag; // if no matching key found
         private int userIdNotmention; // if user id is not mentained or null user id
         private String rec_id=""; // rec id from edi_misc
         e4p_PgpEncryption()
         public void setInitialValues(String ffName,String ffPath,String batidd,String publickeyy,String recid )
              int i=0;
              pgpReturnMsg="";
              encryptedFile=0;
              errMsg="";
              fileName=ffName;
              filePath=ffPath;
              batchId=batidd;
              userid=publickeyy;
              rec_id=recid;
              processFile="";
              successString="";
              keyErrString="";
         public void setFlagValues()
              fileNotFoundErr=0;
              fileExistErr=0;
              ioExceptionErr=0;
              fileEncrytionFlag=0;
              pgpDbConnectionError=0;
              databaseUpdationErr=0;
              directoryErr=0;
              keyErrFlag=0;
              userIdNotmention=0;
              unableToAdduserid=0;
              keyNotSigned=0;
          * update the file status after encryption in batchfiles_detail table
         public void updateDataBase()
              int dbstat=0;
                   //checkConnection();
                   int filestat=2;
                   int row =1;//tmp set
                   try
                        if(e4p_ConfigurationLoader.conn.isClosed()==true)
                             Exception ee=new Exception();
                             dbstat=e4p_DatabaseConnectionChecker.invokeDBChecker(this,0,ee);
                        if(dbstat==1 && e4p_ConfigurationLoader.mainlSentFlag==0)
                        else
                        Statement stmt = e4p_ConfigurationLoader.conn.createStatement();                      
                   //     row=stmt.executeUpdate("update batchfile_details SET batch_filename='"+newName+"' where  batch_id='"+batchIdd+"'");//Mod cl_id='"+cl_idd+"' and srv_id='"+service_idd+"' and
                        row=stmt.executeUpdate("update batchfile_details SET file_status='"+filestat+"' where  batch_id='"+batchId+"'");//Mod cl_id='"+cl_idd+"' and srv_id='"+service_idd+"' and
                        if(row==0)
                        databaseUpdationErr=1;
                        else
                        databaseUpdationErr=0;
                        stmt.close();
                   catch (Exception E)
                     databaseUpdationErr=1;
                     //     String mailSubject="Error:e4p_Database connection error";
                        //     String mailContent="error in connection to e4p_Database after reestablishing connection Message: "+E.getMessage();
                        //     e4p_MailSender.send(mailSubject,mailContent);
                        //     E.printStackTrace();
                        dbstat=e4p_DatabaseConnectionChecker.invokeDBChecker(this,0,E);
          * method used to compose the response from pgp encryption process
         public void pgpMessaging(String message)
              if(ioExceptionErr==1)
                  pgpReturnMsg="-13"+"Encryption  Error: IO Exception occured";
             else
             if(fileNotFoundErr==1)
                  pgpReturnMsg="-14"+fileName+" Encryption Error: File/path does not exist";
                  String mailSubject="Error:File not found for decryption";
                   String mailContent=processFile+"does not exits for Encryption process";
                   e4p_MailSender.send(mailSubject,mailContent);
             ///file or path is incorrect
             else
             if(pgpDbConnectionError==1)
                  pgpReturnMsg="-15"+"Pgp e4p_Database connection error";
             else
             if(databaseUpdationErr==1)
                  pgpReturnMsg="-16"+"Error while updating dataBase in Pgp";
              else
             if(fileEncrytionFlag==1)
                  pgpReturnMsg="1"+fileName+" Encrypted SuccessFully;";
             else
             if(directoryErr==1)
                  pgpReturnMsg="-17 "+filePath+" Directory is not valid";
                  String mailSubject="Error:Directory does not exist";
                   String mailContent="Directory: "+filePath+ " is not a valid Directory";
                   e4p_MailSender.send(mailSubject,mailContent);
             else
             if(keyErrFlag==1)
                  pgpReturnMsg="-18 "+keyErrString;
                  String mailSubject="Error:Public key not Matching";
                   String mailContent=keyErrString +" for encrypting file "+processFile;
                   e4p_MailSender.send(mailSubject,mailContent);
             else
             if(userIdNotmention==1)
                  pgpReturnMsg="-19"+" user id not mentioned or null userid";
             else
             if(unableToAdduserid==1)
                  pgpReturnMsg="-20"+message;
             else
             if(keyNotSigned==1)
                  pgpReturnMsg="-21"+userid+ " is not signed key id";
                  String mailSubject="Error: "+userid+ " is not signed id";;
                   String mailContent=userid+ " is not signed id unable to encrypt file "+processFile;
                   e4p_MailSender.send(mailSubject,mailContent);
          * success string for checking the response from pgp
         public void makeSuccessString()
              successString="Transport armor file:"+" "+processFile+".asc";//this is the string used to indicate
              System.out.println("Print success string:"+successString);
                                                                                         //successfull completion     
          * message for checking the error
         public void makePublicErrorString()
              keyErrString="Cannot find the public key matching userid '"+userid+"'";     
          * used for composing filename used for encryption process with caring space problem
         public void setNamePath()
              processFile=filePath+ "/" + fileName;
              makeSuccessString();
              System.out.println("Path:"+processFile);
              char cc='"';
              StringBuffer ss=new StringBuffer("");
              ss.append(cc);
              ss.append(processFile);
              ss.append(cc);
              processFile=ss.toString();
          * ///actually encypting the file and track success message from Pgp
          * execute the pgp from  command line
         public void doEncryption()
              //System.out.println("inside doEncryption");
              rt=Runtime.getRuntime();
              String makePgpString="";
              //batch mode avoid the process hanging
              // command="pgp +pubring=public key ring path +batchmode -ea file to be encrypt user id for encrption"
              makePgpString="pgp +pubring="+e4p_ConfigurationLoader.pubringPath+" +batchmode -ea "+processFile+" "+userid;//imposed error
         //     makePgpString="cd";
              String ls_str="";
              BufferedReader buffer;
              try
                   processCmd=rt.exec(makePgpString);
                   buffer=new BufferedReader(new InputStreamReader(processCmd.getInputStream()));
                ls_str = buffer.readLine();
                int countLine=0;
                        System.out.println("Start printl=ing;");
                     while (ls_str!= null)
                              System.out.println(ls_str);
                          countLine++;
                           //System.out.println(ls_str);
                           if(ls_str.equals(successString)) //check the success string is found
                                ///successtring is encyption completed message
                                //System.out.println("The total count lines are:"+countLine);
                                fileEncrytionFlag=1; // sucess flag
                                //System.out.println("File encrypted successfully: Flag is"+fileEncrytionFlag);
                           if(ls_str.equals(keyErrString))
                                keyErrFlag=1;     
                            ls_str = buffer.readLine();
                    if(countLine==4) // count line for file not found message
                         ///pgp subprocess string contains 4 lines
                         //System.out.println("File path not found");
                         fileNotFoundErr=1;
                    if(countLine>=15) // count line for key not signed message
                         keyNotSigned=1;
                    buffer.close();
                    processCmd.destroy();
                         System.out.println("********The total count lines are:"+countLine);
              catch(Exception e)
                   e.printStackTrace();
                   ioExceptionErr=1;
          * check the file is already in encrypted format if there then delete
         public void checkFileExist()
                        int len=0;
                        //System.out.println("checking files:"+fileName[no]);
                       String checkFilename=fileName+".asc";// check the encryption format file
                       int i=0;
                        File checkfile[];
                        //System.out.println("file Path"+filePath[no]);
                       File dir=new File(filePath);
                       if(dir.isDirectory()==true)
                            checkfile=dir.listFiles();
                            len=checkfile.length;
                            String tmpname="";
                            for(i=0;i<len;i++)
                                 tmpname=checkfile.getName().toString();
                             if(checkFilename.equals(tmpname))
                                  fileExistErr=1;     
                                  if(checkfile[i].delete()){ System.out.println(tmpname +" deleted");}
                                  //delete the file
                                  break;
                   else
                        directoryErr=1;
         * update the new user id added in the keyring to edi_misc table
         public void updateUserid()
              int dbstat=0;
              //checkConnection();
              try
                   if(e4p_ConfigurationLoader.conn.isClosed()==true)
                        Exception ee=new Exception();
                        dbstat=e4p_DatabaseConnectionChecker.invokeDBChecker(this,0,ee);
                   if(dbstat==1 && e4p_ConfigurationLoader.mainlSentFlag==0)
                   else
                        String keepnull="";
                        Statement stmt = e4p_ConfigurationLoader.conn.createStatement();
                        stmt.executeUpdate("update edi_misc SET enc_id='"+userid+"',enc_publickeypath='"+keepnull+"' where rec_id='"+rec_id+"' ");
                        stmt.close();
              catch(Exception ee)
                        //     String mailSubject="Error:e4p_Database connection error";
                        //     String mailContent="error in connection to e4p_Database after reestablishing connection Message: "+ee.getMessage();
                        //     e4p_MailSender.send(mailSubject,mailContent);
                   dbstat=e4p_DatabaseConnectionChecker.invokeDBChecker(this,0,ee);
         public void checkConnection()
              try
                   if(e4p_ConfigurationLoader.conn.isClosed()==true)
                        e4p_ConfigurationLoader.setDataBaseConnection();
              }catch(Exception ee){ e4p_ConfigurationLoader.setDataBaseConnection();}
         * pgp encryption process entry point
         * call encryption process
         * synchronize the message
         public String pgpEncryptionStarter(String fName,String fPath,String batid,String publickey,String importPath,String reccid)
                   setInitialValues(fName,fPath,batid,publickey,reccid);
                   //import key calling facility
                   e4p_PgpkeyImport pgpImport=new e4p_PgpkeyImport();
                   String response=pgpImport.keyImportStarter(importPath);
                   //check the response and get the public key
                   if(response.charAt(0)!='1')
                        String colectRes=response.substring(2,response.length());
                        unableToAdduserid=1;
                        pgpMessaging(colectRes);
                   else
                        response=response.substring(1,response.length());
                        int indexval=response.indexOf("$"); // read the user id pass from pgp import
                        if(indexval==-1)
                        else
                             String extractid=response.substring(indexval+2,response.length()-1);
                             userid=extractid;
                             updateUserid();
                        setFlagValues();
                        if(filePath.startsWith("/")==false)
                             filePath=e4p_ConfigurationLoader.relative_path+"/"+filePath;
                        //filePath="/"+filePath;
                        else
                             filePath=e4p_ConfigurationLoader.relative_path+filePath;
                        checkFileExist(); // check the file exist for encryption
                        if(directoryErr==0)
                             setNamePath();//no error reporting
                        //     makeSuccessString();//no error reporting
                             makePublicErrorString();
                             if(userid.equals("") || userid==null)
                                  userIdNotmention=1;
                                  pgpMessaging("");
                             else
                                  char cc='"';
                                  StringBuffer ss=new StringBuffer("");
                                  ss.append(cc);
                                  ss.append(userid);
                                  ss.append(cc);
                                  userid=ss.toString();
                                  doEncryption();// error reporting file not found/ioexception/encryption flag
                        else
                             pgpMessaging("");
                        if(fileNotFoundErr==1)
                             pgpMessaging("");
                        if(ioExceptionErr==1)
                             pgpMessaging("");
                        if(keyErrFlag==1)
                             pgpMessaging("");
                        if(keyNotSigned==1)
                             pgpMessaging("");
                        if(fileEncrytionFlag==1)
                             pgpMessaging("");
                             updateDataBase();//update file name from txt to .asc file
                                            //error reporting updation error
                             if(databaseUpdationErr==1)
                                  pgpMessaging("");
                   System.out.println("Pgp message :"+pgpReturnMsg);
                   return pgpReturnMsg;

  • How to create dom treeof html page with java

    hi, all
    i met with a problem how to create dom tree of html page wih jave, that is, given a html page, how to create a dom tree of this page with java?
    thanks in advance.
    regards
    richard

    but i m using this code to create node in html file
    HTMLLIElement li = (HTMLLIElement)appHTML.createElement("LI");
    Text txt = appHTML.createTextNode(name);
    li.appendChild(txt);
    appHTML.getElementById("name").appendChild(li);
    this will display all name value which is coming from database,
    and i want to assign a hyperlink to it,
    I have id with name also so I thought that using id i will
    create javascript like
    function popup(id)
         if(id==1)
              var n1 = window.open("../list/name1.html");
         if(id==2)
              var n1 = window.open("../list/name2.html");
    this way i want to popup particular file if i can pass id value in this function
    so want hyperlink like
    name

  • Who use sql-mapping with java.util.regex?

    Hi everyone:
    I use the IBatis SQL-Mapping and I think it is very good.Now I want to add the search function to my BBS forum.I also want to display the content high light like jive.I mean that if I want to find the string "ibatis",then the search result "ibatis" will be high light displayed.
    So I must use the java.util.regex in jsdk1.4.But the problem is that what I get is a List if I use sql-mapping.For example:
              String resource="conf/XML/sql/lyo-sql-map.xml";
              Reader reader=Resources.getResourceAsReader(resource);
              sqlmap=XmlSqlMapBuilder.buildSqlMap(reader);
              List articlelist=sqlmap.executeQueryForList("selectSiteArticle","%"+icontent+"%");
    The result I get is a List and I have no time to use regex.
    I don't know whether I could do this:
    Iterate the List,use the regex and later place all the object back to the List.
    It's right?
    How to use regex with sql-mapping?Thks

    Any idea? :(

  • Error using Database addons with SQL query.

    I get a LabVIEW error when I provide the following SQL query to the NI database VI: ..vi.lib\addons\database\Connection.llb\Conn Execute.vi. 
    declare @SR_ID table ( script_result_id uniqueidentifier )
    insert into @SR_ID
    select script_result_id from SCRIPT_RESULT
    where script_result.software_name = '%s'
    SELECT distinct STEP_RESULT.STEP_TYPE
    FROM STEP_RESULT INNER JOIN @SR_ID s ON
    STEP_RESULT.SCRIPT_RESULT_ID = s.script_result_id
    The error is:
    Error -2146824584 occurred at NI_Database_API.lvlib:Rec Destroy - Connection.vi->Database_Query Database with flattened string reply.vi->ADUTS-RPT Query DB.vi->ADUTS-RPT Get Step Names.vi->ADUTS-RPT Top.vi
    Possible Reason(s): Exception occured in ADODB.Recordset: Operation is not allowed when the object is closed.
    The query works fine when given directly to my SQL server.
    Any ideas on this problem would be most appreciated.

    It looks like the bug is related to ADODB objects. I found a related KnowledgeBase article that was written about the same issue, but never published for some reason. Here's what it has to say about your error:
    "This error occurs when a query is run on the database that does not return any recordset data, such as a delete command.  In this case, when you encounter the DB Tools Fetch Recordset Data VI, the state of the recordset is "closed" and produces the error.
    To avoid the error, you can check for the state of the recordset and make sure that it isn't closed. To do this, use the DB Tools Get Properties VI and check the state from the properties cluster.  An additional, or alternate, check would be to check for the beginning of file and end of file properties.  If both BOF and EOF are both true, there is no data in the recordset.  
    If you open the example program, Database Fetching, you can see that they are using both of these checks.
    In versions of the toolset prior to version 1.0.2, these checks were built in.  This causes code without the checks to return this error if the toolset is updated from a previous version."
    Tim W.
    Applications Engineering
    National Instruments
    http://www.ni.com/support 

  • How to use HTML parameters in Java applet

    Hello
    In perl I have created a form with things like a selectiuon box called currency and text fields called product for example. Then when I click submit the perl program can pick up the currency and product parameters.
    I have read about applet param eg <param name="param1" value="Apple"> is this the same thing? Or is it different?
    Can I use HTML parameters or do I need to use applet param? I am confused.
    If applet param is what I need, then how do I change the param values say by editing text in a text field?

    You will need to use Java Native Interface JNI. Ther are many posts on the subject, please search, and this is the documentation:
    http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/jniTOC.html

  • How to use Xpath effectively with Java

    I am using Xpath for parsing a String with following syntax.This is a string suppose String xmlShopstring.
    <shopper>
                <upc>0123456789</upc>
                <desc>Planeters Peanutus</desc>
                <regprice>1.99</regprice>           
                <errorcode></errorcode>
            </shopper>In this case how can I use xpath parsing ?

    You can use classes from javax.xml, org.w3c.dom packages for performing XML operations in java.
    These APIs have very rich set of classes and methods for performing XML operations effectively.
    pravi.pravi wrote: how can I use xpath parsing?You need to parse XML String to org.w3c.dom.Document with use of following classes:
    javax.xml.parsers.DocumentBuilderFactory
    javax.xml.parsers.DocumentBuilderOnce you parse XML String to org.w3c.dom.Document you can use following classes and others for very effective XPath parsing.
    javax.xml.xpath.XPathFactory
    javax.xml.xpath.XPath
    javax.xml.xpath.XPathExpression
    javax.xml.xpath.XPathConstantsI have listed some classes which can help you to perform XPath parsing, you should also explore other classes in the API for more XML operations.
    Refer thread: http://forums.sun.com/thread.jspa?threadID=5357836
    Thanks,
    Tejas Purohit

  • Get html data with java

    Ok say I want to get some kind of data from a html page? How could it be done? Is this possible with java, or do I have to use some kind of scripting language?

    It looks like what you might be looking for is a method of getting HTTP, not HTML, data. HTML is simply text and can therefore be retrieved any way that a File could be retrieved (using a FileReader/FileWriter). HTTP, on the other hand, is the protocol that we use the most when viewing websites.
    If you're looking to make HTTP request, you may want to look into something like java.net.HttpURLConnection. Try searching these forums for HTTP, not html.

  • Error while performing SSO with java application

    hi ALL ,
    I got rhe following error when i call a java application in portal  using ticket logon sso
    Exception report
    message Internal Server Error
    description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    exception
    com.sap.test.TicketVerifierException: Request does not contain cookies
         at com.sap.test.TicketVerifierServlet.getSSOCookie(TicketVerifierServlet.java:149)
         at com.sap.test.TicketVerifierServlet.getUserFromRequest(TicketVerifierServlet.java:94)
         at com.sap.test.TicketVerifierServlet.doPost(TicketVerifierServlet.java:80)
         at com.sap.test.TicketVerifierServlet.doGet(TicketVerifierServlet.java:68)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:484)

    Hi Sarang,
    It seems you are following the two basic pre-req.
    It may be now possible that your browser might be not allowing cookies. Which browser are u using? Version etc?
    Right now u can try two things:
    1) When you have logged into portal, type the following command in the adress bar "javascript:alert(document.cookie)". This will give u a popup displaying the cookies formed when logged into portal
    2) Use some software like HTTPWatch or ieHeaders and find out the details. It will give you all the cookie details etc.
    You should be able to see the JSESSIONID, MYSAPSSO2 cookies...Let me know the result of above..
    Regards
    Gaurav

  • How to use Thread.sleep() with Java Berkeley Base API?

    Hi,
    I have explained the weird problem about the server was too busy to response to SSH but it continued to finish to run (Server not response when inserting millions of records using Java Base API
    Even I tried to increase CachSize and renice Java program, but it did not work. So, I am thinking to set sleeping time for threads in Java Berkeley Base API (using “ps” command, there were 18 light weight processes created). My program did not implement transaction or concurrency because it simply creates (millions) databases records only. Is it possible and correct to do like this in the code:
    try{
    //do create a db record
    Thread.currentThread().sleep(1000);//sleep for 1000 ms
    catch(ItrerruptedException ie){
    Thank you for your kindly suggestion.
    Nattiya

    where can I get the help doc about use AT commands in java.
    Can you give me some code example about this. It is
    difficulty to me to write it myself.You simply have to send the characters and receive the characters via the comm extension. Here is the ITU standard command set - http://ridge.trideja.com/wireless/atcommands/v250.pdf. Various modems and other devices extend this in a number of ways, you may need to find documentation specific to your device as well. But start with the standard.

  • Applet failed to load when visited using HTTPs protocol with Java 7

    We have a java applet on our website which worked for ages. Then Java 7 came out, people installed it. When people with Java 7 visiting our website using HTTPS, the applet failed to load (ClassNotFoundException). The same site and the same applet, when visit using regular HTTP, it works fine.
    People with previous version of Java (1.6.x) can see the applet using either HTTP or HTTPs with no problem.
    Anything we can do on our side to resolve this problem for people with Java 7 and like to stay with HTTPS?
    Googled and didn't see any relevant result. Any pointer would be much appreciated.

    Thanks for the quick response.
    Not much on the stack trace, did a tread dump below.
    It is an application requires login, please sent and email to [email protected] and I will sent you the url and login info by email.
    Thanks
    plugin2manager.parentwindowDispose
    Java Plug-in 10.4.0.22
    Using JRE version 1.7.0_04-b22 Java HotSpot(TM) Client VM
    User home directory = C:\Users\dchen
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    Dump thread stack ...
    2012-05-10 17:17:59
    Full thread dump Java HotSpot(TM) Client VM (23.0-b21 mixed mode, sharing):
    "D3D Screen Updater" daemon prio=8 tid=0x04fa1800 nid=0x530 in Object.wait() [0x0a0df000]
    java.lang.Thread.State: TIMED_WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         at sun.java2d.d3d.D3DScreenUpdateManager.run(Unknown Source)
         - locked <0x296c0248> (a java.lang.Object)
         at java.lang.Thread.run(Unknown Source)
    "ConsoleTraceListener" daemon prio=4 tid=0x04fa0000 nid=0x269c in Object.wait() [0x09c8f000]
    java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:503)
         at com.sun.deploy.uitoolkit.ui.ConsoleTraceListener$ConsoleWriterThread.run(Unknown Source)
         - locked <0x296c0c90> (a com.sun.deploy.uitoolkit.ui.ConsoleTraceListener$BoundedStringBuffer)
    "AWT-EventQueue-1" prio=6 tid=0x04fa2000 nid=0x1730 waiting on condition [0x0a6ce000]
    java.lang.Thread.State: RUNNABLE
         at com.sun.deploy.uitoolkit.ui.ConsoleHelper.dumpAllStacksImpl(Native Method)
         at com.sun.deploy.uitoolkit.ui.ConsoleHelper.dumpAllStacks(Unknown Source)
         at com.sun.deploy.uitoolkit.impl.awt.ui.SwingConsoleWindow$2.actionPerformed(Unknown Source)
         at javax.swing.JComponent$ActionStandin.actionPerformed(Unknown Source)
         at javax.swing.SwingUtilities.notifyAction(Unknown Source)
         at javax.swing.JComponent.processKeyBinding(Unknown Source)
         at javax.swing.KeyboardManager.fireBinding(Unknown Source)
         at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
         at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)
         at javax.swing.JComponent.processKeyBindings(Unknown Source)
         at javax.swing.JComponent.processKeyEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
         at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
         at java.awt.EventQueue.access$000(Unknown Source)
         at java.awt.EventQueue$3.run(Unknown Source)
         at java.awt.EventQueue$3.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
         at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
         at java.awt.EventQueue$4.run(Unknown Source)
         at java.awt.EventQueue$4.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    "TimerQueue" daemon prio=4 tid=0x04f9e000 nid=0x3e0c waiting on condition [0x09f3f000]
    java.lang.Thread.State: WAITING (parking)
         at sun.misc.Unsafe.park(Native Method)
         - parking to wait for <0x24620900> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
         at java.util.concurrent.locks.LockSupport.park(Unknown Source)
         at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
         at java.util.concurrent.DelayQueue.take(Unknown Source)
         at javax.swing.TimerQueue.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    "AWT-EventQueue-4" prio=4 tid=0x04fa1400 nid=0x255c waiting on condition [0x0945f000]
    java.lang.Thread.State: WAITING (parking)
         at sun.misc.Unsafe.park(Native Method)
         - parking to wait for <0x246209e8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
         at java.util.concurrent.locks.LockSupport.park(Unknown Source)
         at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
         at java.awt.EventQueue.getNextEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    "Applet 5 LiveConnect Worker Thread" prio=4 tid=0x04f9f400 nid=0x3994 in Object.wait() [0x05d9f000]
    java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:503)
         at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$LiveConnectWorker.run(Unknown Source)
         - locked <0x24620ac8> (a java.lang.Object)
         at java.lang.Thread.run(Unknown Source)
    "AWT-EventQueue-0" prio=6 tid=0x04f9fc00 nid=0x3b2c waiting on condition [0x0608f000]
    java.lang.Thread.State: WAITING (parking)
         at sun.misc.Unsafe.park(Native Method)
         - parking to wait for <0x2979ab70> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
         at java.util.concurrent.locks.LockSupport.park(Unknown Source)
         at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
         at java.awt.EventQueue.getNextEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    "AWT-Shutdown" prio=6 tid=0x04f9e800 nid=0x244c in Object.wait() [0x0669f000]
    java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:503)
         at sun.awt.AWTAutoShutdown.run(Unknown Source)
         - locked <0x2979acd8> (a java.lang.Object)
         at java.lang.Thread.run(Unknown Source)
    "TimerQueue" daemon prio=6 tid=0x04fa0c00 nid=0x3914 waiting on condition [0x0a65f000]
    java.lang.Thread.State: WAITING (parking)
         at sun.misc.Unsafe.park(Native Method)
         - parking to wait for <0x29c27340> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
         at java.util.concurrent.locks.LockSupport.park(Unknown Source)
         at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
         at java.util.concurrent.DelayQueue.take(Unknown Source)
         at javax.swing.TimerQueue.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    "JVM[id=2]-Heartbeat" daemon prio=6 tid=0x04f9ec00 nid=0x3c98 in Object.wait() [0x0687f000]
    java.lang.Thread.State: TIMED_WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         at sun.plugin2.main.server.HeartbeatThread.run(Unknown Source)
         - locked <0x2979a7a0> (a sun.plugin2.main.client.PluginMain$Heartbeat)
    "Browser Side Object Cleanup Thread" prio=6 tid=0x04f9d000 nid=0x3ce4 in Object.wait() [0x0710f000]
    java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x2979a958> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         - locked <0x2979a958> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         at sun.plugin2.main.client.LiveConnectSupport$BrowserSideObjectCleanupThread.run(Unknown Source)
    "CacheCleanUpThread" daemon prio=6 tid=0x04f9dc00 nid=0x2500 in Object.wait() [0x0655f000]
    java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x2979a978> (a com.sun.deploy.cache.CleanupThread)
         at java.lang.Object.wait(Object.java:503)
         at com.sun.deploy.cache.CleanupThread.run(Unknown Source)
         - locked <0x2979a978> (a com.sun.deploy.cache.CleanupThread)
    "CacheMemoryCleanUpThread" daemon prio=6 tid=0x04f9d400 nid=0x1ac4 in Object.wait() [0x0611f000]
    java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x2979aa68> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         - locked <0x2979aa68> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         at com.sun.deploy.cache.MemoryCache$LoadedResourceCleanupThread.run(Unknown Source)
    "SysExecutionTheadCreator" daemon prio=6 tid=0x04f9c800 nid=0x3ff4 in Object.wait() [0x0660f000]
    java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:503)
         at sun.plugin.util.PluginSysUtil$SysExecutionThreadCreator.run(Unknown Source)
         - locked <0x2979aa88> (a sun.plugin.util.PluginSysUtil$SysExecutionThreadCreator)
    "AWT-Windows" daemon prio=6 tid=0x04f8f000 nid=0x3480 runnable [0x026af000]
    java.lang.Thread.State: RUNNABLE
         at sun.awt.windows.WToolkit.eventLoop(Native Method)
         at sun.awt.windows.WToolkit.run(Unknown Source)
    "Java2D Disposer" daemon prio=10 tid=0x04f8d000 nid=0x1920 in Object.wait() [0x064ff000]
    java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         - locked <0x2979ad68> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         at sun.java2d.Disposer.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    "Java Plug-In Pipe Worker Thread (Client-Side)" daemon prio=6 tid=0x04f8a000 nid=0x580 runnable [0x0617f000]
    java.lang.Thread.State: RUNNABLE
         at sun.plugin2.os.windows.Windows.ReadFile0(Native Method)
         at sun.plugin2.os.windows.Windows.ReadFile(Unknown Source)
         at sun.plugin2.ipc.windows.WindowsNamedPipe.read(Unknown Source)
         at sun.plugin2.message.transport.NamedPipeTransport$SerializerImpl.read(Unknown Source)
         at sun.plugin2.message.transport.NamedPipeTransport$SerializerImpl.readByte(Unknown Source)
         at sun.plugin2.message.AbstractSerializer.readInt(Unknown Source)
         at sun.plugin2.message.transport.SerializingTransport.read(Unknown Source)
         at sun.plugin2.message.Pipe$WorkerThread.run(Unknown Source)
    "Timer-0" prio=6 tid=0x04f3d800 nid=0x2c38 in Object.wait() [0x0521f000]
    java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x2979b0a8> (a java.util.TaskQueue)
         at java.lang.Object.wait(Object.java:503)
         at java.util.TimerThread.mainLoop(Unknown Source)
         - locked <0x2979b0a8> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Unknown Source)
    "traceMsgQueueThread" daemon prio=6 tid=0x04f19c00 nid=0x3b50 in Object.wait() [0x054cf000]
    java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:503)
         at com.sun.deploy.trace.Trace$TraceMsgQueueChecker.run(Unknown Source)
         - locked <0x298209e0> (a java.util.ArrayList)
         at java.lang.Thread.run(Unknown Source)
    "Service Thread" daemon prio=6 tid=0x04e80c00 nid=0x2930 runnable [0x00000000]
    java.lang.Thread.State: RUNNABLE
    "C1 CompilerThread0" daemon prio=10 tid=0x04e7c400 nid=0x2648 waiting on condition [0x00000000]
    java.lang.Thread.State: RUNNABLE
    "Attach Listener" daemon prio=10 tid=0x04e7b000 nid=0x1b5c runnable [0x00000000]
    java.lang.Thread.State: RUNNABLE
    "Signal Dispatcher" daemon prio=10 tid=0x04e77c00 nid=0x1bd0 runnable [0x00000000]
    java.lang.Thread.State: RUNNABLE
    "Finalizer" daemon prio=8 tid=0x022e1000 nid=0x3d00 in Object.wait() [0x04c5f000]
    java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         - locked <0x2979b330> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(Unknown Source)
         at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)
    "Reference Handler" daemon prio=10 tid=0x022df800 nid=0x3644 in Object.wait() [0x04bdf000]
    java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         at java.lang.Object.wait(Object.java:503)
         at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
         - locked <0x2979a0c8> (a java.lang.ref.Reference$Lock)
    "main" prio=6 tid=0x0036d800 nid=0x2f40 in Object.wait() [0x00a2f000]
    java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         at sun.plugin2.message.Queue.waitForMessage(Unknown Source)
         - locked <0x2979b3b8> (a sun.plugin2.message.Queue)
         at sun.plugin2.message.Pipe$1.run(Unknown Source)
         at com.sun.deploy.util.Waiter$1.wait(Unknown Source)
         at com.sun.deploy.util.Waiter.runAndWait(Unknown Source)
         at sun.plugin2.message.Pipe.receive(Unknown Source)
         at sun.plugin2.main.client.PluginMain.mainLoop(Unknown Source)
         at sun.plugin2.main.client.PluginMain.run(Unknown Source)
         at sun.plugin2.main.client.PluginMain.main(Unknown Source)
    "VM Thread" prio=10 tid=0x022de400 nid=0x3cc0 runnable
    "VM Periodic Task Thread" prio=10 tid=0x04ea9000 nid=0x3fd4 waiting on condition
    .main.client.PluginMain.run(Unknown Source)
         at sun.plugin2.main.client.PluginMain.main(Unknown Source)
    "VM Thread" prio=10 tid=0x022de400 nid=0x3cc0 runnable
    "VM Periodic Task Thread" prio=10 tid=0x04ea9000 nid=0x3fd4 waiting on condition
    Done.

Maybe you are looking for

  • RETURN Clause in IF...ELSE Condition in PL/SQL Block

    Hi Could you please explain me the importance of a RETURN Clause in IF..ELSE Condition in PL/SQL Block with an example. Regards Nakul.V

  • How to go back in software versions?

    Can anyone detail a procedure for loading older versions on software? I have loaded the latest version for a 2710en and would love to go back to V6.13 which had better map routing and included map items such as round abouts that are not evident after

  • Patch 120335-04

    Having some trouble installing this patch. Have not found anything that helps. Here is what I am getting: Utility used to install the update failed with exit code 5. Checking installed patches...Executing prepatch script...Verifying sufficient filesy

  • Time stamp woes

    Attached is a code I am building to generate and acquire waveform signals and then write them to a text file with appropriate time stamps. As it stands, I have only linked up the writing portion to the acquired signals (I plan to write generated sign

  • Att: Abelhinha  Re: Advice needed from you Professionals out there

    Hi again! Thanks for your replies yesterday. I went through your code, and done some reading on interfaces and stuff, and understand what your code is doing. I am going to explain, based on my understanding, what my code should do, and would greatly