I wrote a code declaring a function in the <%! %> tags but the parser gets an error saying <%! tag doesn't have a %>, that's false, I close the tag. Idecide touse <jsp:declaration></jsp:declaration> but the result is the same. I made other changes(as let the function alone,without any other declaration) anditstill not working. I'm using TomCat 5.0.18
Originally posted by Sergio Andres Chicas Bastidas: We'll I'm using JSP XML syntax 'cause the error appears when I use <%! and %> then I inocently think by changing that maybe the problem goes off.(Don't laugh, I was desesperate)
That is desperate! The JSP Document syntax is not meant for hand-coding. You'll find yourself with so many markup issues it'll make any other issues you may be having seem trivial.
Post your original code using <%! %> for us to take a look at.
And I'd be remiss for not mentioning that once you get past this you should look into bringing your pages into the modern era and ditching the use of scriptlets and scriptlet declarations entirely.
OK. Let me explain what I'm working. My project sends data from a cellphone to a server and to other way(that's one reason the page is ugly, it's not a final one). The page in question is test one(I test somany things there until they are ready), I test several things in it,but I've never write a function in the jsp code(so I have never an error like that). Now I'm trying JSON data format(it works) and savingit at disk. I wrote a function that gives me a file name(a random one), but when I declare it in <%! %> parser error is sent.
Note: the name of page(midlet), it's only a name, don't think I don't know what is it(in fact I wrote the midlet that sends data to server and in the other way). Note: this is not a useless page, I did an other interface to send data to server from a site(not cell phone)
Sorry if I give irrelevant information.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com