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

JSP Tag Error

prathamesh bandivadekar
Ranch Hand

Joined: May 22, 2008
Posts: 43
I am trying to add a tag JSP for hands-on. But it is not working.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>First JSP</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>

<BODY>
<FORM Action="LoginProcess.jsp">

Username : <input type="text" name="uname" value="<%= request.getParameter("uname")%>"/>

Password : <input type="password" name="password"/>


<INPUT type="submit" value="Login"/>

</FORM>
</BODY>
</HTML>

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")%>
Password :

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.....
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

Well, yeah, you do have to name your file with a ".jsp" extension to have JSP processing done on it.
prathamesh bandivadekar
Ranch Hand

Joined: May 22, 2008
Posts: 43
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!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61232
    
  66

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] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP Tag Error