A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Refactoring for Software Design Smells: Managing Technical Debt
this week in the
OO, Patterns, UML and Refactoring
JSP Tag Error
Joined: May 22, 2008
Jul 19, 2011 12:03:15
I am trying to add a tag
for hands-on. But it is not working.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
Username : <input type="text" name="uname" value="<%= request.getParameter("uname")%>"/>
Password : <input type="password" name="password"/>
<INPUT type="submit" value="Login"/>
I am saving this file as Login.html
If login fails it returns to the same page as a error page. It is supposed to show entered username in the Username box.
But is is showing as
Username : <%= request.getParameter("uname")%>
Now if i change the file name to Login.jsp it works fine!
Why is that so?
Please do reply!
Output is coming as not expected in .html file
Prathamesh M.B.<br />Java....only.....
Joined: Oct 14, 2005
Jul 19, 2011 12:07:04
Well, yeah, you do have to name your file with a ".jsp" extension to have JSP processing done on it.
Joined: May 22, 2008
Jul 19, 2011 12:19:14
But our tutor showed the same example in .html file!
Unfortunately he is not available for any comments!
So i was wondering how can we incorporate such jsp tags in .html file!
Author and ninkuma
Joined: Jan 10, 2002
Jul 19, 2011 12:53:39
Unless you do a lot of serious fiddling with mappings and such, which I am sure that at this point is beyond the scope of your studies, you must use the .jsp file type. Otherwise, it's not a JSP.
Asking smart questions
Books by Bear
Have you checked out
subject: JSP Tag Error
Struts 1.1 using RAD7
Problem With jsp:forward
Internal Error while Validating username and password
JSP with DWR.XML
Problem about inserting into database
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015