Not able to run JSP
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Lori_Burzynski
Posted On:   Monday, June 30, 2003 07:48 AM

My JSP Page I am a new Tomcat and JSP user. (But I am a Java and ASP developer.) I have installed Tomcat 4.1.24 on Win2k. I am able execute some JSP pages. I have not been able to run the examples given with the tomcat install (127.0.0.1:8080/examples/jsp/index.html) or any JSP page that has usebean . I get the same error page each time: HTTP Status 500 (server encountered an internal error that prevented it from fulfilling this request). I think this has to do with my environment variables. CLASSPATH: C:Program FilesApache GroupTomcat 4.1webappsexamplesweb-infclasses TOMCAT_HOME: C:Program FilesApache GroupTomcat 4.1 CATALINA_HOME: C:Program FilesApache GroupTomcat 4.1 instartup.bat    More>>
My JSP Page

I am a new Tomcat and JSP user. (But I am a Java and ASP developer.) I have installed Tomcat 4.1.24 on Win2k. I am able execute some JSP pages. I have not been able to run the examples given with the tomcat install (127.0.0.1:8080/examples/jsp/index.html) or any JSP page that has usebean . I get the same error page each time: HTTP Status 500 (server encountered an internal error that prevented it from fulfilling this request). I think this has to do with my environment variables.

CLASSPATH: C:Program FilesApache GroupTomcat 4.1webappsexamplesweb-infclasses

TOMCAT_HOME: C:Program FilesApache GroupTomcat 4.1

CATALINA_HOME: C:Program FilesApache GroupTomcat 4.1 instartup.bat



Also, I have the same simple JSP code in 2 .jsp files. One runs, the other does not. (I had copied the file and renamed it so that I could do some more work on it.) Any ideas on why this is? This is what is in the file:

			
<%!
String siteName = "My Web Site";
public String stars(int x)
{
String message = "*";
for (int i = 0; i < x; i++)
message = message + "*";
return message;
}
%>





Welcome to <%=siteName%>

<%= stars(20)%>





I am sorry if this problem was addressed elsewhere in the forum. I did search, but could find nothing.


I would appreciate any help you could give me.

Thanks, Lori
   <<Less

Re: Not able to run JSP

Posted By:   AlessandroA_Garbagnati  
Posted On:   Monday, June 30, 2003 08:16 AM

Hi,

You must have to set only 2 environment variables:

JAVA_HOME that points to the installation dir of your J2SE (i.e.: c:jdk1.4.2)

CATALINA_HOME that points to the installation dir of your Tomcat copy (i.e.: C:Program FilesApache GroupTomcat 4.1).


Everything else is useless.

About | Sitemap | Contact