aspose file tools*
The moose likes JSP and the fly likes Unable to run JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Unable to run JSP" Watch "Unable to run JSP" New topic
Author

Unable to run JSP

Raja Kannappan
Ranch Hand

Joined: May 08, 2002
Posts: 83
I've a simple html page and when user clicks on the Ok button, it tries to execute the JSP page. But when I click "OK", instead of executing the JSP, it tries to save the JSP. I'm using tomcat server and it is running. Is there a reason why it is trying to save the JSP instead of executing it?
Any help is greatly appreciated.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

How are you referencing the JSP page from the HTML page?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Raja Kannappan
Ranch Hand

Joined: May 08, 2002
Posts: 83
I reference the JSP like this. The jsp and html page are in the same directory. I also tried using method="post", but still I'm getting the same behavior.

<form action="show_entry.jsp" method="get">
....
....
</form>

It detects the file jsp file, but somehow tries to save it instead of executing it.

Thanks in advance.
[ September 24, 2006: Message edited by: Raja Kannappan ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

By "save it" I assume you mean that the browser pops up a "Save As" dialog?

If you do save it, does it contain the JSP source code, or the rendered HTML?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

Something to check: are you referencing your pages on the same port that Tomcat is using? 8080 by default.

Do you also have Apache running on port 80?
Raja Kannappan
Ranch Hand

Joined: May 08, 2002
Posts: 83
I found the problem. I was trying to access the html page directly like c:\tomcat....\index.html. Instead, I used it via the localhost and it now executes the jsp page. But the problem now is I'm getting tomcat error 500 and it displays the following exception:

javax.servlet.servletexception: sun/tools/javac/main

Any idea on what is causing this? Thanks for the help.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

That would be a better question for the Tomcat forum.
 
wood burning stoves
 
subject: Unable to run JSP
 
Similar Threads
Saving images using JS
downloding file prolem(dialog box not coming)
JavaScript section in JSP Page
Scope of Jsp Variables, Urgent
Struts 2 updating record problem