wood burning stoves*
The moose likes Struts and the fly likes Problem with taglib declaration. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem with taglib declaration." Watch "Problem with taglib declaration." New topic
Author

Problem with taglib declaration.

Vadim Vararu
Ranch Hand

Joined: Jan 03, 2009
Posts: 147
I get such error:


though, i have included all struts libraries... and used such taglib declarations:


So, i can't understand what's the problem.

P.S. I use last version of Struts 1


If you think you've done too much, usually it means you've done too few.
Vadim Vararu
Ranch Hand

Joined: Jan 03, 2009
Posts: 147
Now, i've made some changes in web.xml and i get this error:
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Searching the web provides several possible solutions. What server are you running? Some have a bundled version of Struts. What libraries are you deploying? Have you verified the versions of all the deployed libraries (and verified that deployment is happening correctly)?
Vadim Vararu
Ranch Hand

Joined: Jan 03, 2009
Posts: 147
I'm using tomcat 6.x without any bundled version of framework and latest version of Struts1 downloaded from official site.

This is the .jsp that i try to access:


When i call it with struts taglib declaration line, i get error, when i delete that line, it goes ok. So the problem is in the taglib declaration somewhere i guess.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

*Please* list the libraries you're deploying--it's really difficult to help if you don't provide requested information.

Are you deploying a jsp library?
Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
latest version of Struts1 downloaded from official site.


if you already have downloaded the Struts 1. then why not to use them-
put all tld in WEB-INF. and all your libraries in your src project lib folder.

refer all tld by specifying the location as /WEB-INF/struts-html.tld
instead of specifying the urls. this will also make your project portable.


SCJP 1.4, SCWCD 5, SCBCD 5, OCPJWSD 5,SCEA-1, Started Assignment Part 2
My blog- http://rkydesigns.blogspot.com
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

App servers haven't needed extracted TLDs for years, and TC6 certainly doesn't.
Vadim Vararu
Ranch Hand

Joined: Jan 03, 2009
Posts: 147
Here is the list of libraries i deploy:
.......................................................
antlr-2.7.2
bsf-2.3.0
commons-beanutils-1.8.0
commons-chain-1.2
commons-digester-1.8
commons-fileupload-1.1.1
commons-io-1.1
commons-logging-1.0.4
commons-validator-1.3.1
jstl-1.0.2
oro-2.0.8
standard-1.0.6
struts-core-1.3.10
struts-el-1.3.10
struts-extras-1.3.10
struts-faces-1.3.10
struts-mailreader-dao-1.3.10
struts-scripting-1.3.10
struts-taglib-1.3.10
struts-tiles-1.3.10
...........................................................

I don't have any .tld-s in web-inf directory. I just write in .jsp-s write uri and container do extract .tld-s by itself. It is correct, isn't it?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

What does your web.xml look like? I can't reproduce this, so right now I'm thinking there's a deployment or configuration issue. I'd also recommend removing any libraries you're *not* using.
Vadim Vararu
Ranch Hand

Joined: Jan 03, 2009
Posts: 147
Uhhh... it was an Eclipse issue. I just didn't deploy libraries correctly.
Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
David Newton wrote:App servers haven't needed extracted TLDs for years, and TC6 certainly doesn't.


I did not understand what this really means.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

@Vadim: Happens all the time

@Amandeep: It means that TLDs are discoverable inside library files and do not need to exist on the filesystem as separate, physical files.
 
GeeCON Prague 2014
 
subject: Problem with taglib declaration.