File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tag Error

 
Samanthi perera
Ranch Hand
Posts: 510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Samanthi perera
Ranch Hand
Posts: 510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you do have it in a directive... which is almost certainly not what you want.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Heh, I didn't even notice that part, just the directive part.
 
Samanthi perera
Ranch Hand
Posts: 510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic