• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem in JSP --help please

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic