wood burning stoves 2.0*
The moose likes JSP and the fly likes working with JSTL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "working with JSTL" Watch "working with JSTL" New topic
Author

working with JSTL

Praveena Paruchuru
Greenhorn

Joined: Dec 10, 2009
Posts: 6
Hi

I wanted to examples on JSTL. but I am getting some problem.

web.xml



example1.jspx



I have placed .tld files under WEB-INF/tld folder and jstl.jar and standard.jar in lib folder in my project folder. I am using weblogic server. I am using example server and using placed the war file in autodeploy folder and jstl.jar and standard.jar files inside samples\domains\wl_server\lib.

When i am tryign to access the example1.jspx, it is throwing the error Illegal token for taglib directive.

Could anybody tell me what is the problem?

Thanks
Praveena
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

I'm not really sure about weblogic, but in most modern containers you don't need to explicitly put taglib declarations in web.xml. Anyway try to put jstl.jar and standard.jar inside the WEB-INF/lib folder of your WAR file and then deploy it...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60764
    
  65

Ankit is correct. Remove all those declarations from the web.xml - they're just in the way. You are also using an older URI for the JSTL, be usre to use the up-todate URI. See the JSP FAQ for more information.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Praveena Paruchuru
Greenhorn

Joined: Dec 10, 2009
Posts: 6
Thanks for the reply.

I removed all the entries in the web.xml and placed the jar files only in project lib folder and removed these jars from server common lib. In the other way also, I removed the jars from project lib and placed them in server common lib, still it is throwing the below error.

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60764
    
  65

"Praveena Pk", please check your private messages for an important administrative matter. Thanks.
Praveena Paruchuru
Greenhorn

Joined: Dec 10, 2009
Posts: 6
Hi Bear,

I didn't get any mail.

I found the solution for this. We need to keep taglib entries in the web.xml but we need to rename the .jspx to .jsp. When it is .jspx it is not recognosing scriptlets.

Regards,
Praveena.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60764
    
  65

I didn't say "mail", I said private messages. The link is above.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: working with JSTL
 
Similar Threads
JSTL version causing exceptions?
problem with jstl
isScriptingEnabled dircetive problem
jstl problem
JSTL problem