aspose file tools*
The moose likes JSP and the fly likes 'lt%!' and '%gt' invalid in a tag file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark " Watch " New topic
Author

'lt%!' and '%gt' invalid in a tag file?

Shraddha Jain
Greenhorn

Joined: Feb 02, 2006
Posts: 27
i'm deploying my web application on tomcat and use JSP tags in the jsp files.
i have a screen.tag:
<%@ tag body-content="scriptless" %>
<%@ tag import="javax.servlet.jsp.PageContext" %>
<%@ tag import="file1" %>
<%@ tag import="file2" %>
<%@ tag import="file3" %>


<%!
//some declarations go here
%>

and when i run my application i get a jasper exception telling me '<%!' and '%>' is an invalid character constant!
i cannot agree with this guy!! what am i doing to render it invalid?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61429
    
  67

<%@ tag body-content="scriptless" %>


You declared the tag scriptless. What else did you expect?
[ March 02, 2006: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61429
    
  67

P.S. Your only other choices are tagdependent and empty -- so what does that tell you about the applicability of scripting element within a tag file?
Shraddha Jain
Greenhorn

Joined: Feb 02, 2006
Posts: 27
nope that isnt the problem at all 'cos i have 2 other tag files with the same directive and they working just fine!!! no problemo!
and wait i did test this screen.tag with lt%= "Hi"!! %gt and the page did say Hi!! back!
besides as far as i know, "scriptless" attribute is to say that the body of the tag does not have any scripts right??? , i havent put no scripts in the tags body!

tried removing the "...scriptless" attribute but thats doing nothing good for me.
 
 
subject: 'lt%!' and '%gt' invalid in a tag file?