0
<script>
  var availableTags = [
    <% for (int i = 0; i < ApplicationName.size(); i++) { %>
      <%= ApplicationName.get(i) %>
      <%= i + 1 < ApplicationName.size() ? ",":"" %>
    <% } %>
  ];

  $(function() {
    $( "#tags" ).autocomplete({
      source: availableTags
    });
  });

  function value()
  {
    alert(document.getElementById('tags').value);
    var a=document.getElementById('tags').value;
    return a;
  }
</script>

It gives me below error:

Struts has detected an unhandled exception:

Please tell where am I going wrong.

4
  • You should tag your question appropriately, put at least struts and jsp on it. Commented Feb 26, 2015 at 21:38
  • Can you please put the rest of your error? This is inconclusive: Struts has detected an unhandled exception: Commented Feb 26, 2015 at 21:39
  • Put the code in scriptlet to the action. Commented Feb 27, 2015 at 15:08
  • You should look at the rendered output. Also, ew, scriptlets. Commented Feb 27, 2015 at 16:35

1 Answer 1

1

You may try putting the following in quotes:

<%= "'"+ApplicationName.get(i)+"'" %>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.