Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


New JSP user looking for help with error message

New JSP user looking for help with error message

New JSP user looking for help with error message

Hi folks,

I'm somewhat new at using JSP and am having a tough time debugging the programs because the error messages are for a different "level" of code. You know what I mean.

Anyway, the two messages I keep getting are:

/web/ibm/was.2.03adv/servlets/pagecompile/_SpacemanReports/_UserReport2_xjsp.java:137: Can't specify array dimension in a declaration.
data[0].writeChars(1495, 1, out);
/web/ibm/was.2.03adv/servlets/pagecompile/_SpacemanReports/_UserReport2_xjsp.java:137: Identifier expected.
data[0].writeChars(1495, 1, out);
Perhaps some of you more experienced JSP programmers can at least point me in the right direction concerning what parts to look at.

Oh and here's my code, if you're interested:

%@ language="java" import="java.util.*" %

h3 Spaceman User Reports

HttpSession session = request.getSession(true);

String message=(String)session.getValue("Message");

// ResultSet is used to check if the user has requested anything yet
ResultSet rs=(ResultSet)session.getValue("ResultSet");

if (message != null) { % h4 %= message % /h4
% }

// If RecordSet is null then just display opening form.
if (rs == null) {

form method="POST" action="/servlet/UserReportServlet2"
table border=0 cellspacing=0 width=100%
td align=right width=25% Employee Serial No: /td
td input type=test name=empsn size=10 /td
input type=submit name=submit value=Submit


// If RecordSet is not null, display the results held within it

else {
try {
ResultSetMetaData rsMeta=rs.getMetaData(); %
table border="2" cellpadding="3"

// display the Column Headings:
% for (int i=1; i=rsMeta.getColumnCount();i++) { %
td h4 %= rsMeta.getCoumnName(i) % /h4 /td
% } %

% while (rs.next()) { %
% for (int i=1; i =rsMeta.getColumnCount();i++) { %
td %= rs.getObject(i) %/td
% } %
% } % /table
} catch (Exception any) { % An Error occured. %= any.getMessage() % % }

Thank you,

RE: New JSP user looking for help with error message


Sorry I made a mistake and messed up the formatting for all of your code.  If you want, just re-post your code as a REPLY to your question.

Sorry about that again...


RE: New JSP user looking for help with error message

I can't seem to repost the page, it is picking up the html and translating it.  But that's okay, if someone could just give me an idea of what might be wrong, or general things to look more closely at, that might be all I need to get me over the hump.

Thanks again,

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close