This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in JSP --help please

 
kaarthik asokkumar
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use Tomcat 5.0.
I created a servlet which will pass the result to a JSP page. I got an error saying that

**Unable to compile class for JSP
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.

but ive set the environment variable JAVA_HOME to javac. should i have to set java home in apache?? if yes where should i set in apache. THanks for ur help
 
sangeeta kapoor
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java_home needs to be set to ur jdk
Eg

c:\jdk
 
kaarthik asokkumar
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks sangeetha but ive already set my java_home to my jdk its still not working

public void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException,ServletException
{
String c=request.getParameter("color");

CoffeeExpert ce=new CoffeeExpert();
List result=ce.getbrands(c);

request.setAttribute("styles",result);

//1 **RequestDispatcherview=request.getRequestDispatcher("result.jsp");
view.forward(request,response);
}

Exception is thrown in line 1
 
kaarthik asokkumar
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for every one i finally fixed the probs. I had to reinstall the tomcat and then set the java home then to my jdk during my installation and worked
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic