Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error while building JSP in eclipse

 
Mike Jeya
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
I am developing a web appication using eclipse IDE. I have 3 jsps' say , Main.jsp , Header.jsp , footer.jsp.

I am including header.jsp and footer.jsp into Main.jsp.

Header.jsp and footer.jsp has some jsp expression tags which will get the values from variables which are declared in Main.jsp.

While building using eclipse, I am getting error in Header.jsp and Footer.jsp says cannot resolve sybmol..I don't know that y this error is coming?

if anybody has idea to solve this,please post the answer....

Thanks in Advance
 
Abhimanyu Kumar
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mike Jeya:

I am including header.jsp and footer.jsp into Main.jsp.
Header.jsp and footer.jsp has some jsp expression tags which will get the values from variables which are declared in Main.jsp.
Thanks in Advance


Hi,
How are you including those jsp's in the Main.jsp ?
It will be better if you post your code here. Anyways, i'll give it a blind try.
If you are using <%@ include file="/jspName.jsp" %>, put it after the variable declaration in Main.jsp.
If you are using jsp:include, then it wont work as far as I know. Because, jsp:include will not copy the source into Main.jsp (as opposed to include file). It puts the o/p of the included file and not the source.
Correct me if I'm wrong.

-Abhimanyu.
 
Mike Jeya
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
exactly I am doing the same way.
It's working ,if I deploy directly to the server.
My probs is, it's not working,if I build thru eclipse.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34178
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike,
What plugin are you using with Eclipse to get the JSP support?

In WSAD (the commercial version of Eclipse), we get those errors. However when run on the server, the JSPs compile properly. The problem is that the header/footer aren't independent JSPs.

One solution is to use the extension .jspf (JSP fragment) so the IDE knows not to expect a compilable JSP.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic