Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

illegal character (httpunit; )

xzwsun
2007-01-25
2013-04-26
  • xzwsun
    xzwsun
    2007-01-25

    test code :

        WebConversation wc = new WebConversation();
    //    获取响应对象
        WebResponse   resp = wc.getResponse( "http://localhost:8088/IDSPMODEL/pages/job/jobsearch.jsp" );

    error info as below:

    SyntaxError: illegal character (httpunit; )
        at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:597)
        at org.mozilla.javascript.TokenStream.reportSyntaxError(TokenStream.java:1324)
        at org.mozilla.javascript.TokenStream.getToken(TokenStream.java:1302)
        at org.mozilla.javascript.Parser.memberExprTail(Parser.java:1213)
        at org.mozilla.javascript.Parser.memberExpr(Parser.java:1204)
        at org.mozilla.javascript.Parser.unaryExpr(Parser.java:1115)
        at org.mozilla.javascript.Parser.mulExpr(Parser.java:1062)
        at org.mozilla.javascript.Parser.addExpr(Parser.java:1045)
        at org.mozilla.javascript.Parser.shiftExpr(Parser.java:1032)
        at org.mozilla.javascript.Parser.relExpr(Parser.java:1015)
        at org.mozilla.javascript.Parser.eqExpr(Parser.java:1002)
        at org.mozilla.javascript.Parser.bitAndExpr(Parser.java:991)
        at org.mozilla.javascript.Parser.bitXorExpr(Parser.java:980)
        at org.mozilla.javascript.Parser.bitOrExpr(Parser.java:969)
        at org.mozilla.javascript.Parser.andExpr(Parser.java:957)
        at org.mozilla.javascript.Parser.orExpr(Parser.java:945)
        at org.mozilla.javascript.Parser.condExpr(Parser.java:928)
        at org.mozilla.javascript.Parser.assignExpr(Parser.java:909)
        at org.mozilla.javascript.Parser.expr(Parser.java:898)
        at org.mozilla.javascript.Parser.statementHelper(Parser.java:791)
        at org.mozilla.javascript.Parser.statement(Parser.java:387)
        at org.mozilla.javascript.Parser.parse(Parser.java:128)
        at org.mozilla.javascript.Context.compile(Context.java:2053)
        at org.mozilla.javascript.Context.compile(Context.java:2006)
        at org.mozilla.javascript.Context.compileReader(Context.java:899)
        at org.mozilla.javascript.Context.evaluateReader(Context.java:817)
        at org.mozilla.javascript.Context.evaluateString(Context.java:784)
        at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.executeScript(JavaScript.java:132)
        at com.meterware.httpunit.scripting.ScriptableDelegate.runScript(ScriptableDelegate.java:65)
        at com.meterware.httpunit.parsing.ScriptFilter.getTranslatedScript(ScriptFilter.java:151)
        at com.meterware.httpunit.parsing.ScriptFilter.endElement(ScriptFilter.java:131)
        at org.cyberneko.html.filters.DefaultFilter.endElement(Unknown Source)
        at org.cyberneko.html.filters.NamespaceBinder.endElement(Unknown Source)
        at org.cyberneko.html.HTMLTagBalancer.callEndElement(Unknown Source)
        at org.cyberneko.html.HTMLTagBalancer.endElement(Unknown Source)
        at org.cyberneko.html.HTMLScanner$SpecialScanner.scan(Unknown Source)
        at org.cyberneko.html.HTMLScanner.scanDocument(Unknown Source)
        at org.cyberneko.html.HTMLConfiguration.parse(Unknown Source)
        at org.cyberneko.html.HTMLConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
        at com.meterware.httpunit.parsing.NekoHTMLParser.parse(NekoHTMLParser.java:41)
        at com.meterware.httpunit.HTMLPage.parse(HTMLPage.java:255)
        at com.meterware.httpunit.WebResponse.getReceivedPage(WebResponse.java:1109)
        at com.meterware.httpunit.WebResponse.getFrames(WebResponse.java:1098)
        at com.meterware.httpunit.WebResponse.getFrameRequests(WebResponse.java:875)
        at com.meterware.httpunit.FrameHolder.updateFrames(FrameHolder.java:179)
        at com.meterware.httpunit.WebWindow.updateFrameContents(WebWindow.java:252)
        at com.meterware.httpunit.WebClient.updateFrameContents(WebClient.java:485)
        at com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:146)
        at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:130)
        at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:121)
        at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:102)
        at com.meterware.httpunit.WebClient.getResponse(WebClient.java:87)
        at NeusoftTest.main(NeusoftTest.java:138)
    ------------------------------------------------------------------------------------------

    my jsp code

    <html>
        <head>
    <META http-equiv="Content-Style-Type" content="text/css" charset="UTF-8"/>
        <script language="javascript" src="../../javascript/idsp.js"></script>
        </head>
        <LINK rel="stylesheet" href="../../style/main.css" type="text/css"/>
        <body>
        <table><tr><td width="680">
        <label class="headertitle">测试</label></td>
        <td onclick='document.location.href="jobtypedisplay.html"'>
        <script>button("一览")</script></td></tr></table>
        <p/>
          <table width="100%" border="1" cellspacing="0"  cellpadding="4"     bordercolor="#FFFFFF"  style="border-color:#999999" class="commonfont">
            <tr>
              <th th width="100%"  noWrap align="left"  bgcolor="#CC6699">检索</th>

            </tr>
        <tr>
    <td>

                 <table class="commonfont">
            <tr>
              <td ><input name="Input11" type="checkbox" value="" />
                  <label  style="">&nbsp;ID:</label>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;
                </td>
              <td >
                <input name="Input12" type="text" value="" size="35" /></td>
            </tr>
                <tr>
              <td ><input name="Input21" type="checkbox" value="" />
                  <label  style="">&nbsp;几种:</label>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
    <td ><input name="Input22" type="text" size="35" /></td>
            </tr>
            <tr>
              <td ><input name="Input31" type="checkbox" value="" />
                  <label  style="">&nbsp;表达&nbsp;</label>
                  &nbsp;
                  </td>
              <td >
                  <input name="Input32" type="text" size="35" /></td>
            </tr>
            <tr>
              <td ><input name="Input41" type="checkbox" value="" />
                  <label  style="">&nbsp;序号</label>
                  &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;  
                    </td> 
              <td > 
                       <input name="Input42" type="text" size="35" /></td>
            </tr>
            <tr>
              <td ><input name="Input" type="checkbox" value="" />
                  <label  style="">&nbsp;名称</label>
                  &nbsp;&nbsp; &nbsp;&nbsp;
    </td>
              <td ><select>
                    <option>        </option>
                  </select></td>
            </tr>
            <tr>
              <td ><input name="Input" type="checkbox" value="" />
                  <label  style="">&nbsp;姓名 </label>
                  &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          </td>
              <td ><select>
                    <option>        </option>
                  </select>          </td>
            </tr>   
            <tr>
              <td ><input name="Input51" type="checkbox" value="" />
                  <label  style="">&nbsp;状态</label>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
              <td >
                <input name="Input52" type="text" value="" size="35" /></td>
            </tr>   
            <tr>
              <td ><input name="Input" type="checkbox" value="" />
                  <label  style="">&nbsp;状态id </label>
                  &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
              <td ><select>
                    <option>        </option>
                  </select>          </td>
            </tr>     
            <tr>
              <td ><input name="Input" type="checkbox" value="" />
                  <label  style="">&nbsp;发行日期         </label>
                  &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
              <td >
                  <select><option>2006</option></select>/<select><option>12</option></select>/<select><option>15</option></select>&nbsp;<select><option>12</option></select>
                  <select><option>2006</option></select>/<select><option>12</option></select>/<select><option>15</option></select>&nbsp;<select><option>12</option></select>          </td>
            </tr>   
    </table>

    </td></tr>
    <tr><td><hr color="#999999" with="3" /></td></tr>
    <tr><td><label onclick="searchcheck()"><script>button("检索+"&nbsp;&nbsp;")</script></label></td></tr>
          </table>
        </form>
        </body>
        </html>

     
    • Wolfgang Fahl
      Wolfgang Fahl
      2008-03-30

      Your code contains an illegal character - after posting it to this forum it may not be there any more because it might have been filtered out by the forum software ...