[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 322
  • Last Modified:

SOS

Hi,
I had very bad start with jsp,
how you ppl know and trap errors id the compiler can't define the exact number of the error...
I am using front page to edit jsp pages, I have many errors come like this :
An error occurred at line: 227 in the jsp file: /xyz/task.jsp
Generated servlet error:
Syntax error on token(s), misplaced construct(s)

line 227 is just %>
which is the end of code.
any good tools can I depend on to trace the code???
is that the normal situation in java??

thnx
0
ethar1
Asked:
ethar1
  • 5
  • 3
1 Solution
 
jessegivyCommented:
Yes, it's painfully normal to get not only the wrong line number but a completely unhelpful error message.  Usually you should have some kind of idea as to where the error might be.  Sometimes I just have to scan the entire page to figure it out.  Can be rough if your talking about a hundred thousand lines of code.  

USE COMMENTS!!!

Trial and error is necessary to decern untracable errors.  Comment out half the page if you have to and get it to run even if it isn't doing what it's supposed to.  This is a very basic debugging tecnique that helps narrow down the section of your code that is having trouble.

P.S. GET AWAY FROM MICROSOFT front page will kill ya, it's almost as bad as making web pages in MS Word!  Macromedia rocks, I think you can even download a trial version of dreamweaver to try it out.

I'm hoping someone does know of a tool that gives the correct message every time but I doubt it.
0
 
ethar1Author Commented:
i can blive that I spent 2 days to find that I missed a ")"

realy I can't trust such a language , as a developers we have no future with this language....

I forced to use this language by my customer , think that i will have a new good tools and educate my self ( on customer account :) ) but unfortunately i got stuck with this stupid language...

I came from MS and now I appreciate it very very much as a company and products...

even the help, when you read help files , feel like ppl setdown in nasty cafee and write it.
one month now everyday i try to configure IIS to work with jsp directly but I failed , I can't find one compatible name of anything between the real and the manual.
0
 
Mig-OCommented:
Use Eclipse with MyEclipse as an excellent jsp-plugin. It has syntax highlighting in html & java-parts, java autocompletion, java compiling, a jsp-debugger(!) that jumps to the line in the jsp where it is executing and much more.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
ethar1Author Commented:
Mig-O , could you please give a link?
Thanks.
0
 
Mig-OCommented:
0
 
Mig-OCommented:
Btw. Eclipse is the best Java-IDE because of its many many plug-ins. In fact it is an IDE for everything.

PS: I know many people love IDEA out there, too.
0
 
ethar1Author Commented:
thnx Mig-O ,
now I download 85mg , hope not wrong and the software for free :)
i am tired now , and hope my nightmare end with your software...
0
 
Mig-OCommented:
As far as i know, MyEclipse is not free (at least not for more than 30 days) But the ~100$ are worth it.
0
 
Mig-OCommented:
PS: You need MyEclipse for the jsp-debugging features
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now