JSP String != JavaScript String

I've run across a problem that has intrigued me. Consider the following:
<% String test = new String();
test = "Hello Mr. Anderson...";
%>
<script language="javascript">
function doThis() {
alert("TEST: " + "<%=test%>");
</script>
// No problem, will work just fine. Now add an escape sequence (\n)
// to the test string
<% String test = new String();
test = "Hello Mr. Anderson...\n";
%>
<script language="javascript">
function doThis() {
alert("TEST: " + "<%=test%>");
</script>
Now we get
error: Unterminated string constant
on any call to doThis(). Why????? Javascript has wrappers around it's primitive data types as well, so I was thinking the conversion should be smooth here. Any experts out there know what's happening here?
Thanks,
Chris

The reason is you are printing out what's in the Java string to the browser, and that results in this:
"Hello Mr. Anderson...
So, as the first responder said, you need to escape the \n with \\n, which will write:
"Hello Mr. Anderson...\n"
in the browser, which will get translated in the Javascript parser as a new line.

Similar Messages

  • Use a Message from a bundle in a JavaScript string?

    I cannot use an h:outputText in a JavaScript string, for example:
    function init()
    setTitle("<h:outputText value="#{msgs.title}"/>");
    How can I get a text string from messages.properties that I want to use in some client side JavaScript code?
    Thanks in advance,
    Sam

    Hi Sergey,
    I followed your methos but got the following error msg:
    root cause
    java.lang.IllegalStateException: Component javax.faces.component.UIViewRoot@7dcf98 not expected type. Expected: UIOutput. Perhaps you're missing a tag?
         com.sun.faces.taglib.html_basic.OutputTextTag.setProperties(OutputTextTag.java:90)
         javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:712)
         javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:429)
         com.sun.faces.taglib.html_basic.OutputTextTag.doStartTag(OutputTextTag.java:155)
         org.apache.jsp.main_jsp._jspx_meth_h_outputText_0(main_jsp.java:185)
         org.apache.jsp.main_jsp._jspService(main_jsp.java:129)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         com.stufftolet.view.util.SecurityFilter.doFilter(SecurityFilter.java:76)
         de.mindmatters.faces.spring.RequestHandledFilter.doFilter(RequestHandledFilter.java:117)
    My javascript function is like below:
              <script type="text/javascript">
              <!--
              function init(){
                   setTitle("<h:outputText value='#{main_msg.browser_title}'/>");
              // -->
              </script>     
    and the declared resource bundle:
    <f:loadBundle basename="com.abc.view.bundle.main" var="main_msg"/>
    and I got main_en.properties and main_zh.properties.
    I call the init() function like:
    <body onLoad="init()">          
    please help, Thanks !
    regards,
    kmthien

  • Special characters in a javascript string...

    Hey folks, in the javascript project I'm working on, there's a requirement that an SOH character (start of header, #1 in the ASCII character set) be included in a string. Does anybody know how that character can be inserted in a javascript string? Thanks in advance.

    Thanks to both of you for your good advice. One last question: the project that I'm working on involves exporting the contents of an Adobe InCopy CS2 document to a text file. Before the export occurs, I insert a line that starts with ACSII character 1 and ends with ASCII character 2 , at the top of the file. This tells a subsequent process how and where to push the file. The export is working as it should. However, the ACSII control characters are not exported with the text file. Any thoughts on how, or if, this possible?

  • Where's the problem in my jsp including Chinese string in WL6.0sp1

              hi,
              my code and appear error as follows, pls help
              code:
              <HTML>
              <title>&#27880;&#20876;</title>
              <BODY BGCOLOR="#FFFFFF" >
              <%@ page language="java" contentType="text/html; charset=gb2312" import="java.util.*"
              %>
              <%
                   String temp="&#27979;&#35797;&#27979;&#35797;";
                   //String test="this is a test";
                   if (true) {
                        temp="333333333333333";
                        out.println("----------it's true----------");
                   } else {
                        out.println("----------it's false------");
              %>
              </BODY>
              </HTML>
              error
              Parsing of JSP File '/yjx_test/yangtestSubmit.jsp' failed:
              /yjx_test/yangtestSubmit.jsp(8): scriptlet close brace '}' unbalanced at line
              8 which breaks scope '_base_service_scope_'
              probably occurred due to an error in /yjx_test/yangtestSubmit.jsp line 8:
              //String test="this is a test";
              Wed May 02 10:34:17 CST 2001
              

              Just tested, Your JSP works fine on my Weblogic 6 SP1 server with W2K (English
              version), too.
              "Jinxia Yang" <[email protected]> wrote:
              >
              >yes, my code works fine in weblogic5.1 on my computer, my OS is W2k Chinese
              >version,
              >so i think may be there are bugs in wl6.0sp1.
              >thanks very much.
              >
              >"Xiang Rao" <[email protected]> wrote:
              >>
              >>I have copy-and-pasted your code to my machine. You code works fine
              >on
              >>my machine,
              >>with both Weblogic 6 (no sp1) and weblogic 5.1. My OS is W2k professional,
              >>English
              >>version.
              >>
              >>
              >>"Javaapple" <[email protected]> wrote:
              >>>
              >>>hi,
              >>>my code and appear error as follows, pls help
              >>>code:
              >>><HTML>
              >>><title>&#27880;&#20876;</title>
              >>><BODY BGCOLOR="#FFFFFF" >
              >>><%@ page language="java" contentType="text/html; charset=gb2312" import="java.util.*"
              >>>%>
              >>>
              >>><%
              >>>     String temp="&#27979;&#35797;&#27979;&#35797;";
              >>>     //String test="this is a test";
              >>>
              >>>     if (true) {
              >>>          temp="333333333333333";
              >>>          out.println("----------it's true----------");
              >>>     } else {
              >>>          out.println("----------it's false------");
              >>>     }
              >>>%>
              >>></BODY>
              >>></HTML>
              >>>
              >>>error
              >>>Parsing of JSP File '/yjx_test/yangtestSubmit.jsp' failed:
              >>>--------------------------------------------------------------------------------
              >>> /yjx_test/yangtestSubmit.jsp(8): scriptlet close brace '}' unbalanced
              >>>at line
              >>>8 which breaks scope '_base_service_scope_'
              >>>probably occurred due to an error in /yjx_test/yangtestSubmit.jsp line
              >>>8:
              >>>//String test="this is a test";
              >>>--------------------------------------------------------------------------------
              >>>Wed May 02 10:34:17 CST 2001
              >>
              >
              

  • Read the output of a jsp into a string

    I need a servlet that can return the output html of a jsp as a string. How can I do this? I played around with constructing a URL object and getting an InputStream from that but without success.

    This is kind of a weird hack, but it just might work. If it's only one jsp file that you're working with, instead of putting the code inside a jsp, put it in a servlet instead. Wherever you're outputting something call the method below:
    private String totalOutput="";
    private void doubleOutput(PrintWriter jspout, PrintWriter fileout, String mytext){
       jspout.println(mytext);
       fileout.println(mytext);
       totalOutput+=mytext;
    }So basically you would get the jspout from the response.getWriter() method (in either doGet or doPost method). The fileout is basically a PrintWriter associated with a new FileOutputStream(tempfilename).
    Now, you basically have all the output you need in the file and you can access it later. Alternatively, at the end of the servlet's doGet or doPost method, you'll have access to everything that's output in that 'totalOutput' String (don't forget to reset it after every call to doGet/doPost!)

  • Validating forms in jsp using javaScript

    Hi all i'm trying to validate this form with javeScript. i was testing it with just the <input type=text name= file> first. it works but after the alert message it still posts to writeXML......
    i tried putting the fuction valid() after the <form> tag but it still posts it to writeXML.jsp.......can anyone help me please........What i want to do is make sure that something is typed in all the forms befor posting to writeXML..Thanx
    <html>
    <head> <title>Create MultipleChoice Questions</title> </head>
    <script language="JavaScript">
    function valid(form) {
         if(form.file.value == "")
         alert("Please enter the file name")
    </script>
    <body bgcolor="#cccccc">
    <% int count = 0;
    String number = request.getParameter("nOfq");
    int qNumber = Integer.parseInt(number); %>
    <form action="writeXML.jsp" method="POST">
    <center>
         <table bgcolor="silver" border="1" width="75%">
         <tr align="center"><td><b>Type in the Name of your Questionnaire here eg. BlackHistory.      Dont leave any spaces between letters</b><br>
         <textarea name="file" rows="1" cols="25"></textarea><br>
         </td></tr>
    <% for(int i=1;i<qNumber+1; i++) { %>
    <%count++;%>
         <tr align="center" bgcolor="#336699"><td><b>QUESTION <%= count %>: </b><br>
         </td></tr>
         <tr align="center"><td><b>ENTER QUESTION:</b><br>
         <textarea name=<%="questionText"+i%> rows="5" cols="65"></textarea><br>
         </td></tr>
         <tr align="center"><td><b>CHOICE 1:</b><br>
         <textarea name=<%="choice_1"+i%> rows="2" cols="50"></textarea><br>
         </td></tr>
         <tr align="center"><td><b>CHOICE 2:</b><br>
         <textarea name=<%="choice_2"+i%> rows="2" cols="50"></textarea><br>
         </td></tr>
         <tr align="center"><td><b>CHOICE 3:</b><br>
         <textarea name=<%="choice_3"+i%> rows="2" cols="50"></textarea><br>
         </td></tr>
         <tr align="center"><td><b>CHOICE 4:</b><br>
         <textarea name=<%="choice_4"+i%> rows="2" cols="50"></textarea><br><br><br>
         </td></tr>
         <tr align="center" bgcolor="#679995"><td><b>CORRECT ANSWER:</b><br>
         <textarea name=<%="cAnswer"+i%> rows="2" cols="50"></textarea><br><br><br>
         </td></tr>
    <% } %>
    <tr>
    <td align="center"><input type="submit" name="next" value="NEXTT" onClick="valid(this.form)">
    <td align="center"><input type="hidden" name="qCount" value="<%=count+1%>">
    </td></tr>
    </table>
    </center>
    </form>
    </body>
    </html>

    this Corrected code works perfectly
    <html>
    <head> <title>Create MultipleChoice Questions</title> </head>
    <script language="JavaScript">
    function valid(form) {
    if(form.file.value == ""){
    alert("Please enter the file name");
    frmValid.file.focus();     
    }else{
         frmValid.action="writeXML.jsp";
         frmValid.submit();
    </script>
    <body bgcolor="#cccccc">
    <% int count = 0;
    int qNumber=-1;
    String number = clearNull(request.getParameter("nOfq"));
    if(! number.equals(""))
    qNumber = Integer.parseInt(number);
    %>
    <form name="frmValid" method="POST" >
    <center>
    <table bgcolor="silver" border="1" width="75%">
    <tr align="center"><td><b>Type in the Name of your Questionnaire here eg. BlackHistory. Dont leave any spaces between letters</b><br>
    <textarea name="file" rows="1" cols="25"></textarea><br>
    </td></tr>
    <% for(int i=1;i<qNumber+1; i++) { %>
    <%count++;%>
    <tr align="center" bgcolor="#336699"><td><b>QUESTION <%= count %>: </b><br>
    </td></tr>
    <tr align="center"><td><b>ENTER QUESTION:</b><br>
    <textarea name=<%="questionText"+i%> rows="5" cols="65"></textarea><br>
    </td></tr>
    <tr align="center"><td><b>CHOICE 1:</b><br>
    <textarea name=<%="choice_1"+i%> rows="2" cols="50"></textarea><br>
    </td></tr>
    <tr align="center"><td><b>CHOICE 2:</b><br>
    <textarea name=<%="choice_2"+i%> rows="2" cols="50"></textarea><br>
    </td></tr>
    <tr align="center"><td><b>CHOICE 3:</b><br>
    <textarea name=<%="choice_3"+i%> rows="2" cols="50"></textarea><br>
    </td></tr>
    <tr align="center"><td><b>CHOICE 4:</b><br>
    <textarea name=<%="choice_4"+i%> rows="2" cols="50"></textarea><br><br><br>
    </td></tr>
    <tr align="center" bgcolor="#679995"><td><b>CORRECT ANSWER:</b><br>
    <textarea name=<%="cAnswer"+i%> rows="2" cols="50"></textarea><br><br><br>
    </td></tr>
    <% } %>
    <tr>
    <td align="center"><input type="submit" name="next" value="NEXTT" onClick="valid(this.form)">
    <td align="center"><input type="hidden" name="qCount" value="<%=count+1%>">
    </td></tr>
    </table>
    </center>
    </form>
    </body>
    </html>
    <%!
    private String clearNull( String sField ) {
    return ( sField == null ) ? "" : sField;
    %>

  • Set jsp from javascript

    I have three "div" tags in index.jsp ,
    <div id='header'></div>
    <div id='body'></div>
    <div id='footer'></div>
    Now when window is loaded i want other jsp page to be set in the "body" div tag of index.jsp from javascript
    My javascript code
    function invokeJSP(){
    document.getElementById('body').innerHTML="<jsp:include page='test.jsp'>'";
    when I am including this code in <head > part of index.jsp its working the problem is if at all
    In test.jsp
    if i try to include this line
    <% = request.getParameter("name")%>
    its giving an error like "unterminated literal string" in javascript console
    Can anyone help me how to set the jsp from javascript
    Sorry for my bad english.This is the first time I am posting the forum
    thanks
    hema

    hi
    Thanks for the response
    but i have closed the tag in my program. Have u ever tried to invoke jsp from javascript in this way if it works plz help me.
    thanks hema

  • Embedding JSP in Javascript - filtering newlines

    I'm embedding some JSP tags in a Javascript function.
    It's all working fine except that <html:options> insists on emitting
    a newline after each <option></option> that it generates. So I can't embedd this
    in a Javascript string.
    Can I make <html:options> not produce an newline after each <option></option> ?
    Can I make <html:options> add on a "\" javascript continuation after each <option></option>?
    Can I write a filter tag that I can embed the <html:options> tag in?
    Is there a standard tag that will do what I need?
    Thanks
    Message was edited by:
    jgc94131

    OK, I'm going to post the solution that I've used.
    First off the tag causing the problem is from the struts taglib.
    What I've ended up doing was to use the Jakarta Project: String Tag library,
    which in turn depends on the apache String Utils package.
    The solution looks like this:
    <script language=javascript>
    function foo () {
      document.getElementById("foobar").innerHTML = '<tr><td>\
        <html:select property="searchCategorySelectedOne" value="<%=  CatalogForm.getSearchCategorySelectedOne()%>">\
        <html:option key="CatalogForm.searchCategory.displayname" value=""/>\
        <str:replace replace="NL" with="" newlineToken="NL"><str:replace replace="CR" with="" carriageToken="CR"><html:options collection ="CategoriesHolderList" property="value" labelProperty="label" /></str:replace></str:replace></html:select>\
        <\td><\tr>';
    </script>This example has been simplified to give the gist of the solution, which is
    wrap the <html:options> tag with two calls to <str:replace>.
    Message was edited by:
    jgc94131

  • How to pass value from JSP to Javascript?

    I want to pass 2 integers to Javascript to do checking? How can I do that?

    Well, it is very simple, Follow these steps.
    1. Have a form with fields
    2. On submit validate the form using javascript
    3. If the javascript returns false do not submit the form
    4. if the javascript returns true submit the form
    5. The destination jsp page will handle the db operations.
    1. <form name="frm1" action="dbcheck.jsp">
    <input type="text" name="txt1">
    <input type="button" value="submit" onClick="return validate();">
    </form>
    put the above piece of code in the <body> tag
    2. Upon submit the js function validate() will be called :
    <script language="javascript">
    function validate() {
    if(document.frm1.txt1.value="") {
    alert("enter text");
    return false;
    else {
    document.frm1.submit(); // i am not sure whether the () after submit is required or not
    put the above piece of code in the <head> tag.
    3. Now when the submit happens, the control goes to the dbcheck.jsp
    this is dbcheck.jsp:
    <%
    String str = (String) request.getParameter("txt1");
    ------other db operations go here --------
    %>
    "txt1" is the field name of the textbox from the form u previously submitted.
    all da best

  • Make a dynamic menu using JSP or Javascript

    Hi ,
    I am trying to make a dynamic menu that is using data retrieved from database in the form of a list.
    I have a javascript to make a tree structure menu, but i need to iterate through the list i am reciveing from the database to make the tree structure. here is the code :-
    <Please reply ASAP as my deadline is near>
    <Note:- in javascript to make static menu ul tag is used to make the parent node and li tag is use to make the child node>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <SCRIPT LANGUAGE="JavaScript" SRC="mktree.js"></SCRIPT>
    <LINK REL="stylesheet" HREF="mktree.css">
    </head>
    <body>
    <%@ page import = "java.util.ArrayList, java.util.Iterator, java.util.List, \WEB-INF\classes\DO_JSP.class,
    \WEB-INF\classes\Url_Name.class, java.util.Comparator, java.util.TreeSet, \WEB-INF\classes\MyComp.class" %>
    <%
         class Url_Name {
         String linkName;
         String linkUrl;
         int order;
         * @return the order
         public int getOrder() {
              return order;
         * @param order the order to set
         public void setOrder(int order) {
              this.order = order;
         * @return the linkName
         public String getLinkName() {
              return linkName;
         * @param linkName the linkName to set
         public void setLinkName(String linkName) {
              this.linkName = linkName;
         * @return the linkUrl
         public String getLinkUrl() {
              return linkUrl;
         * @param linkUrl the linkUrl to set
         public void setLinkUrl(String linkUrl) {
              this.linkUrl = linkUrl;
    class MyComp implements Comparator{
         public int compare(Object a, Object b){
              return (((Url_Name)a).getOrder() - ((Url_Name)b).getOrder());
         class DO_JSP
         int parentId;
         String parentName;
         TreeSet linkList;
         Url_Name tempurl;
         * @return the linkList
         DO_JSP(){
              linkList = new TreeSet(new MyComp());
         public TreeSet getLinkList() {
              return linkList;
         * @param linkList the linkList to set
         public void setLinkList(String linkName, String linkUrl, int order) {
              tempurl = new Url_Name();
              tempurl.setLinkName(linkName);
              tempurl.setLinkUrl(linkUrl);
              tempurl.setOrder(order);
              this.linkList.add(tempurl);
         * @return the parentName
         public String getParentName() {
              return parentName;
         * @param parentName the parentName to set
         public void setParentName(String parentName) {
              this.parentName = parentName;
         * @return the parentId
         public int getParentId() {
              return parentId;
         * @param parentId the parentId to set
         public void setParentId(int parentId) {
              this.parentId = parentId;
    %>
    <%
              List listdojsp =new ArrayList();
              listdojsp = (List)session.getAttribute("JspListName");
              Iterator it = listdojsp.iterator();
              do
    %>
              <%
              DO_JSP tempdojsp = (DO_JSP)it.next();
              String Parent = tempdojsp.getParentName();
              %>
              <ul class="mktree">     
              <li> Parent </li>
                   <ul>
              <%
              Iterator ittemp = tempdojsp.getLinkList().iterator();
                   do
                        Url_Name tempurlname = new Url_Name();
                        tempurlname = (Url_Name)ittemp.next();
                        String link = tempurlname.getLinkName();
              %>
                        <li>link</li>
              <%
                   }while(ittemp.hasNext());
              %>
                   </ul>
                   </ul>          
              <%     
              }while(it.hasNext());
              %>
    </body>
    </html>

    Hi ,
    I am trying to make a dynamic menu that is using data
    retrieved from database in the form of a list.
    I have a javascript to make a tree structure menu,
    but i need to iterate through the list i am reciveing
    from the database to make the tree structure. here is
    the code :- Hi, do you have a question? This is more of a "Look what I wrote" sort of post, and you don't seem to be asking for any specific advice. Please tell us what problem you're having, or the error message you're receiving.
    Brian

  • Difference between String=""; and String =null

    I want to know the difference especially the ADVANTAGE between the following-
    1. String s="";
    String s="ABC"
    and
    String s;
    String s="ABC";
    or String s=null;
    String s="ABC";
    2. Object anyObject;
    anyObject-new Object();
    and
    Object anyObject=null;
    anyObject=new Object();

    Tanvir007 wrote:
    I want to know the difference especially the ADVANTAGE between the following-
    1. String s="";s points to the empty string--the String object containing no characters.
    String s="ABC"s points to the String object containing the characters "ABC"
    String s; Declares String reference varialbe s. Doesn't not assign it any value. If it's a local variable, it won't have a value until you explicitly assign it. If it's a member variable, it will be given the value null when the enclosing object is created.
    String s="ABC";Already covered above.
    or String s=null;s does not point to any object.
    String s="ABC";???
    You've already asked this twice.
    Are you talking about doing
    String s = null;
    String s = "ABC";right after each other?
    You can't do that. You can only declare a variable once.
    If you mean
    String s = null;
    s = "ABC";It just does what I described above, one after the other.
    2. Object anyObject;
    anyObject-new Object();
    and
    Object anyObject=null;
    anyObject=new Object();As above: In the first case, its value is undefined until the new Object line if it's a local, or it's null if it's a member.
    As for which is better, it depends what you're doing.

  • Help with StuckThread in java.lang.String.equals(String.java:619)

    I periodically get a stuck Execute thread on my Weblogic 8.15 server
    during a call to a Stateless Session Bean. When I do thread dumps, the
    thread is always stuck in the same place (in
    java.lang.String.equals(String.java:619) or in the call immediately above it
    java.util.LinkedList.indexOf(LinkedList.java:397)). Even though the thread
    dump indicates that the thread is in a runnable state, if I do multiple
    thread dumps over a period of time, the stack trace always indicates that
    the thread is in the same place. The thread remains stuck until Weblogic is
    restarted. Other client applictions can make session bean calls, but each
    stuck thread seems to still take up lots of CPU time. I have let the stuck
    threads run overnight, and the stack trace from the thread dump always shows
    them executing the same String/LinkedList code. In each case, our code is
    trying to iterate over a collection
    Does anybody know what could cause this problem, and how to fix it? I get
    StuckThreadMaxTime errors in the log:
    ####<Dec 4, 2005 10:47:25 AM EST> <Error> <WebLogicServer> <nybill>
    <myserver> <weblogic.health.CoreHealthMonitor> <<WLS Kernel>> <>
    <BEA-000337> <ExecuteThread: '4' for queue: 'weblogic.kernel.Default' has
    been busy for "1,263" seconds working on the request
    "ncss.billing.ejb.billAdmin.session.BillAdminSession_uli3xb_EOImpl", which
    is more than the configured time (StuckThreadMaxTime) of "1,200" seconds.>
    Here are some stack traces from different thread dumps (I have the full
    thread dumps if necessary):
    "ExecuteThread: '10' for queue: 'weblogic.kernel.Default'" daemon prio=5
    tid=0x7720eb98 nid=0xd68 runnable [571f000..571fdb0]
    at java.lang.String.equals(String.java:619)
    at java.util.LinkedList.indexOf(LinkedList.java:398)
    at java.util.LinkedList.contains(LinkedList.java:176)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getDailyCallSummary(XMLBillCr
    eation.java:1992)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getGraphs(XMLBillCreation.jav
    a:1931)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getLocations(XMLBillCreation.
    java:2618)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.createXMLBill(XMLBillCreation
    .java:236)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSessionEJB.getBillAsXml(BillAdmi
    nSessionEJB.java:341)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSession_uli3xb_EOImpl.getBillAsX
    ml(BillAdminSession_uli3xb_EOImpl.java:100)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSession_uli3xb_EOImpl_WLSkel.inv
    oke(Unknown Source)
    at
    weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
    at
    weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
    :108)
    at
    weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
    at
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
    t.java:363)
    at
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
    0)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    "ExecuteThread: '22' for queue: 'weblogic.kernel.Default'" daemon prio=5
    tid=0x772538d0 nid=0xe24 runnable [497f000..4fdb0]
    at java.lang.String.equals(String.java:619)
    at java.util.LinkedList.indexOf(LinkedList.java:398)
    at java.util.LinkedList.contains(LinkedList.java:176)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getMostExpensiveOrLongestCall
    s(XMLBillCreation.java:1892)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getTopTenReport(XMLBillCreati
    on.java:1798)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getTopTenReports(XMLBillCreat
    ion.java:1751)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getLocations(XMLBillCreation.
    java:2612)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.createXMLBill(XMLBillCreation
    .java:236)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSessionEJB.getBillAsXml(BillAdmi
    nSessionEJB.java:341)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSession_uli3xb_EOImpl.getBillAsX
    ml(BillAdminSession_uli3xb_EOIm.java:100)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSession_uli3xb_EOImpl_WLSkel.inv
    oke(Unknown Source)
    at
    weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
    at
    weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
    :108)
    at
    weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
    at
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
    t.java:363)
    at
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
    0)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    "ExecuteThread: '21' for queue: 'weblogic.kernel.Default'" daemon prio=5
    tid=0x76afb060 nid=0x498 runnable [48af000..48fdb0]
    at java.lang.String.equals(String.java:619)
    at java.util.LinkedList.indexOf(LinkedList.java:398)
    at java.util.LinkedList.contains(LinkedList.java:176)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getMostFrequentlyCalledNumber
    sOrCitiesReport(XMLBillCreation.java:1839)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getTopTenReport(XMLBillCreati
    on.java:1772)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getTopTenReports(XMLBillCreat
    ion.java:1743)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getLocations(XMLBillCreation.
    java:2612)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.createXMLBill(XMLBillCreation
    .java:236)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSessionEJB.getBillAsXml(BillAdmi
    nSessionEJB.java:341)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSession_uli3xb_EOImpl.getBillAsX
    ml(BillAdminSession_uli3xb_EOImp.java:100)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSession_uli3xb_EOImpl_WLSkel.inv
    oke(Unknown Source)
    at
    weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
    at
    weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
    :108)
    at
    weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
    at
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
    t.java:363)
    at
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
    0)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    The code in LinkedList that it seems to be executing is the following:
    Line#
    397 for (Entry e = header.next; e != header; e = e.next) {
    398 if (o.equals(e.element))
    399 return index;
    400 index++;
    401 }
    I am running Weblogic 8.15 on Windows 2000.
    Thanks for any help,
    - Don

    njb7ty wrote:
    I suggest dropping that example program and concentrating on reading a book on Java such as 'Head First in Java'. Otherwise, you will spend a lot of time trying to get something to work and gain little value from it.Likewise... Jumping into reflections before you can [read a stack-trace|http://www.0xcafefeed.com/2004/06/of-thread-dumps-and-stack-traces/] is like signing up a toddler for the New York Marathon... it's probably simply beyond your skill level... so step back... go read a book, do some tutorials, get your head around just the process of the designing, writing, compiling, running, and debugging java programs... and what the different diagnostics mean... Then, equipped with your nose-clip and your trusty stone ;-) you contemplate leaping into the deep end ;-)
    Cheers. Keith.

  • Exchange 2010, khi: failed to execute Troubleshoot-DatabaseSpace.ps1 Error formatting a string: Format string is not supported

    Hi,
    Exchange 2010 MP fails to run Troubleshoot-DatabaseSpace.ps1. Results in a Warning with "Error formatting a string: Format string is not supported". The EventNumber is 402. The Microsoft article it points to is useless at http://technet.microsoft.com/en-us/library/749e0eac-ebb2-41e3-8fa2-4a03a1bd3571.aspx 
    Run ".\Troubleshoot-DatabaseSpace.ps1 -Server MailboxServer.domain.com -MonitoringContext" and works fine.
    Any help appreciated.
    thanks

    Hi,
    Before the newer MP release, we can disable  these 4 monitor via override and this should not run the Troubleshoot-DatabaseSpace.ps1 :
    KHI: Failed to execute Troubleshoot-DatabaseSpace.ps1.
    KHI: The database copy is low on database volume space and continues to grow. The volume is under 25% free
    KHI: The database copy is low on database volume space and continues to grow. The volume has reached error levels under 16% free.
    KHI: The database copy is low on database volume space and continues to grow. The volume has reached critical levels 8% free.
    Alex Zhao
    TechNet Community Support

  • String getMimeType(String file)

    String getMimeType(String file)
    in that what is the file exactly,which file is that, is it in the exploded directroy or some thing else
    please help me

    It's the name file (or with the relative path ) of the file that reside on the context path of the web aplication (in the servlet container where it is deployed).

  • Flex input type for c# string array: string[]

    Quick question, what would the input type for Flex be if the data type on the asp.net c# web service was a string array, string[], it seems to autodetect it as an ArrayCollection but that isnt right, so I would assume array, but i would still like to confirm this.
    thanks
    shaine

    it was actually arraycollection :\
    the actual answer is:
    var _compEmp:ArrayCollection = new ArrayCollection(new Array("Shaine Fisher"));
    thanks

  • Jsp in javascript

    hi
    can we use jsp in javascript
    for eg:
    <script>
    if(flag)
    <% respone.sendRedirect("--"); %>
    </script>
    or is there any other way of doing this type of things
    this is only an example.
    thx
    -jay

    You can use JavaScript in a JSP. JavaScript usually runs on client. You can also use Java in a JSP. Here is sample code:
    <%@ page import="java.util.*" %>
    <%
    Calendar cal = Calendar.getInstance();
         int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK);
         int hourOfDay = cal.get(Calendar.HOUR_OF_DAY);
         int minuteOfHour = cal.get(Calendar.MINUTE);
         if (((dayOfWeek == 7) & (hourOfDay == 23) & (minuteOfHour > 29)) || ((dayOfWeek == 1) & (hourOfDay == 0) & (minuteOfHour < 31))) { %>  
    <jsp:forward page="file:///M:/Studio/projects/som/html/IC_0019.htm" />
    <% } %>

Maybe you are looking for

  • Any plug-in api to find out the product info.

    Hi , Is there any plug-in api which can provide information about product name in which it is loaded ...like this plug-in is loaded with Acrobat Reader or Acrobat Professional ? Regards, Arvind

  • Curve 8310 error Unc.Exception: string index out of range: 0

    I'm getting the following error message: "Uncaught Exception: string index out of range: 0" and no way to clear that message. Could someone help me to fix it? Actually the only way to get BB-8310 back working is remove the battery. Thanks in adavance

  • Selection based on list

    i have a master detail form , on the header i want to add pop list for each of the fields in detail block ,  In the detail block i have three fields emp_code,emp_name,job_title, i want to add pop list on each of these three fields based on the select

  • My iphone 5 service keep on "searching" all the time..HELP ME!

    please help me my iphone 5 service just keep on "SEARCHING" for sevice all the time..and i don't connect to my country carrier...please help me!

  • ITunes Sync Error with iPhone

    While sync'ing my iPhone 4S (iOS 7.0.4) with iTunes (11.1.4.62) running on Windows 7, it gets to Step 3 of 6, and pop up an error that reads "Unable to load SyncUICoreLocalized.dll". Tried repairing, and uninstalling/re-installing both iTunes and iCl