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

Tag Error

Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
This is my jsp


this is my tag file


this gives error.
what should i change in tag file to remove error?

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61656
    
  67

Patient: "something hurts"
Doctor: "What hurts?"
Patient: "I won't tell you"

How can the Doctor help?

this gives error.

Without showing us the error, how can we help?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
I am using Netbeans.
This tag file and jsp doesn't compile.
I shows the errors in as a links in above.
Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
I think jsp is correct.
I need to change the tag file to run withuot errors.
I am using example of Head.First.Servlets.and.JSP books exampls(Page 403)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61656
    
  67

Samanthi perera wrote:I shows the errors in as a links in above.

I am not going to follow links to see your errors. Include them as part of the post.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Add the attribute to the tag file: you can't just randomly create tag attributes.

And +1 to what Bear said: if I hadn't accidentally clicked on a link to the picture I wouldn't have bothered. Don't make us do *additional* work to help you.
Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
i change my class

here is my Tag file


here is jsp


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="myTags" tagdir="/WEB-INF/tags" %>




here is my error now

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Well, you do have it in a directive... which is almost certainly not what you want.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61656
    
  67

You cannot mix scriptlets and the EL. You can't! Period. End of story.

Until you stop trying to do so, you are going to have endless problems.

Stop. Step back. Learn JSTL and EL, and then try to do what you are trying to do.

Randomly trying invalid combinatations is wasting your time and ours.

Sorry to sound stern, but we're trying to help the best we can and it's clear that you need to bone up on some fundamentals before proceeding any further.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Heh, I didn't even notice that part, just the directive part.
Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
this is my tag file


this is jsp file


now it is working.My problem is i din't use any TLD file.
1)That means isn't TLD file Required file?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

If it's working, and you didn't use a TLD file, what do *you* think the answer is?

Look at the JSP docs for JSP-based tags, and the taglib directive's tagdir attribute.
 
 
subject: Tag Error