File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes JSP error 500 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP error 500" Watch "JSP error 500" New topic
Author

JSP error 500

Tiby Taran
Greenhorn

Joined: Aug 09, 2001
Posts: 2
Hello,
i'm new to jsps and i have trouble running a jsp from an html file. when i try to run the jsp with tomcat i get the error shown below. Can anyone give me some hints?
Thank you,
Tiby
Error: 500
Location: /search.jsp
Internal Servlet Error:
org.apache.jasper.compiler.ParseException: C:\Inetpub\wwwroot\search.jsp(5,16) Attribute import has no value
at org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:519)
at org.apache.jasper.compiler.JspReader.parseTagAttributes(JspReader.java:635)
at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:192)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:209)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:579)
vivek sivakumar
Ranch Hand

Joined: Aug 09, 2001
Posts: 187
well i too had it several times just chk the path where ur jsp files exist or check the bean (if u r using it does it compile without errors?) i would suggest u also to check the import statements if u r using one.


SCJP, SCWD <br />A farmer learns more from a bad harvest than a good one.
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
You have a syntax error in the page directive. Post your JSP code so we can see what exactly it is.

I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
Tiby Taran
Greenhorn

Joined: Aug 09, 2001
Posts: 2
this is the code. this code has to be executed when i click on a submit button in a html file. also my iis stopes for no reason. i guess is the tomcat. i followed the installation and redirection by the book. thanks for your help guys.
tiby
<%-- when user click submit button. it goes this part --%>
<%@ page errorPage="error.jsp"%>
<%! String result=""; %>
<%@ page import "java.util.*"%>
<%
if(request.getParameter("submit")!=null){
%>
<jsp:useBean id="ClientBeans" scope="request" class="IDRClient.Functions" />
<%
String name=request.getParameter("domain");
String ext=request.getParameter("extension");
name=name + ext;
String lang=request.getParameter("language");
Hashtable info=new Hashtable();
info.put("domain",name);
info.put("language",lang);
synchronized(page) {ClientBeans.check(info);}
result = ClientBeans.getMESSAGE();
}
%>
<%-- end --%>
<%-- the following part is for --%>
<%-- 1. first open this page --%>
<%-- 2. display search result --%>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="Author" content="Ming Huang">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>DOMAIN SEARCH</title>
<script>
function checkinput(){
var domain=document.domainform.domain
if(domain.value == "" | |domain.value.indexOf(".") != -1){
alert("Please input domain name and it can not have dot(.) !!!");
domain.focus();
return false;
}
}
</script>
</head>
<body>

<jsp:include page="includes/header.htm" flush="true"/>
<jsp:include page="includes/searchmenu.htm" flush="true"/>
<%--@ include file="includes/header.htm"--%>
<%--@ include file="includes/searchmenu.htm"--%>
<form name="domainform" method="POST" action="search.jsp" onSubmit="return checkinput()">
<table border="0" cellpadding="0" cellspacing="0" width="600">
<tr>
<td width="20%"></td>
<td width="60%"><b><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="3" color="#006699">PERFORM
A DOMAIN SEARCH</font></b></td>
<td width="20%"></td>
</tr>

<%--this part display search result. when fist open this page it does not appear--%>
<%
if(request.getParameter("submit") != null){
%>
<tr>
<td width="100%" height="30" colspan="3"></td>
</tr>
<tr>
<td width="20%"></td>
<td width="60%"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2" color="#800000"><b><%=result%></b></font></td>
<td width="20%"></td>
</tr>
<%
}
%>
<%-- end --%>
<tr>
<td width="100%" colspan="3" height="30"></td>
</tr>
<tr>
<td width="20%"></td>
<td width="60%" bgcolor="#006699" height="25">
<p align="center"><font face="arial" color="white" size="2"><b>Check the
Availability of Domain Name</b></font></p>
</td>
<td width="20%"></td>
</tr>
<tr>
<td width="20%"></td>
<td width="60%" bgColor="#D9F1F5" height="20"> </td>
<td width="20%"></td>
</tr>
<tr>
<td width="20%"></td>
<td width="60%"bgColor=#d9f1f5>
<p align="center"><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" size="2">www.<input type="text" name="domain" size="20"> 
<select size="1" name="extension">
<option selected value=".com">.com</option>
<option value=".net">.net</option>
<option value=".org">.org</option>
</select></font></p>
</td>
<td width="20%"></td>
</tr>
<tr>
<td width="20%"></td>
<td width="60%" bgcolor="#D9F1F5"> </td>
<td width="20%"></td>
</tr>
<tr>
<td width="20%"></td>
<td width="60%" bgcolor="#D9F1F5">
<p align="center"><font face="Arial" size="2"><b>Choose Language <select size="1" name="language" >
<option value="" selected>English</option>
<option value="sjis">Japanese (Shift-JIS)</option>
<option value="ksc">Koraen (eur-kr)</option>
<option value="gb">Simplified Chinese (GB2312)</option>
<option value="big5">Traditional Chinese (Big5)</option>
</select></b></font></p>
</td>
<td width="20%"></td>
</tr>
<tr>
<td width="20%"></td>
<td width="60%" bgcolor="#D9F1F5"> </td>
<td width="20%"></td>
</tr>
<tr>
<td width="20%"></td>
<td width="60%" bgcolor="#D9F1F5">
<p align="center"><input type="submit" value="Search" name="submit"></p>
</td>
<td width="20%"></td>
</tr>
<tr>
<td width="20%"></td>
<td width="60%" bgcolor="#D9F1F5" height="20"> </td>
<td width="20%"></td>
</tr>
</table>
</form>
</body>
</html>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP error 500