• 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

Exception in jsp-org.apache.jasper.JasperException: /login.jsp(80,0) Unterminated <html:form tag

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Friends,

I am trying to develop a small application in JSP, Struts1 and Java. My application start with login page. My login.jsp is-

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>

<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>YourMemory</title>


<style>

img.logo {
margin-top: 0px;
margin-bottom: -14px;
margin-right: 150px;
margin-left: 94px;
}

#header {
background-color:black;
color:white;
text-align:center;
}

#container {
background-color: white;
color: white;
text-align: center;
border-radius: 25px;
border: 2px solid #8AC007;
padding: 101px;
width: 429px;
height: 150px;
margin-top: 99px;
margin-bottom: -14px;
margin-right: 150px;
margin-left: 400px;
}

#formdata {
height: 20px;
}

</style>

</head>
<body>

<div id="header">
<img class="logo" src="assets/images/logoSprite.png" alt="ADDA52" width="351" height="128">
</div>

<div id="container">
<h1>Welcome</h1>

<!--<html:form class="form"> -->
<html:form action="/Login" focus="username">
<!-- <input type="text" placeholder="Username" id="formdata">
<input type="password" placeholder="Password" id="formdata">
<button type="submit" id="login-button">Login</button> -->

Username : <html:text property="username" id="formdata" placeholder="Username"/><br/>
Password : <html:password property="password" id="formdata" placeholder="Password"/><br/>
<html:submit value="Login"/>


<!-- </form> -->
</html:form>
<br>
<p1 style="color: black;"><h3>New to YourMemory?</h3></p1>
<br>
<a href="http://localhost:8086/YourMemory/registration.jsp">Sign up for a new account</a>

</div>

</body>
</html>

When i am starting my server and trying to load this page, i am getting exception -

HTTP Status 500 - /login.jsp(80,0) Unterminated <html:form tag


type Exception report

message /login.jsp(80,0) Unterminated <html:form tag

description The server encountered an internal error that prevented it from fulfilling this request.

exception
org.apache.jasper.JasperException: /login.jsp(80,0) Unterminated <html:form tag
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:132)
org.apache.jasper.compiler.Parser.parseBody(Parser.java:1649)
org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:978)
org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1246)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1424)
org.apache.jasper.compiler.Parser.parse(Parser.java:130)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:185)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:723)


I am using struts-core-1.3.10 jar. Please help me, I am not able to figure out, where is the problem.

With Regards,
Abhishek
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the JavaRanch.

Abhishek Sri wrote:I am using struts-core-1.3.10 jar.



Unless there is a good reason (i.e. you are supporting an old application) to use Struts 1.x, don't. There hasn't been a new release in almost 10 years, it is unsupported by developers and it has serious architectural issues that makes development time consuming and tedious. Use a "modern" framework like Struts 2, Spring, etc. You end up writing much less code for the framework and are much more productive.
As for your question, I don't see anything obvious. Try deleting the commented out form tags. They shouldn't get compiled, but you never know...
 
reply
    Bookmark Topic Watch Topic
  • New Topic