problems with XSLT and Tomcat Realms

E

Edu

Hi all,

I had working a servlet that transformed xml data into wml or html
(depending on the client browser). Everything was OK, but today I tried to
add authentication before using the servlet.

I use authentication with tomcat realms and (from web.xml)
<auth-method>FORM</auth-method>.

Now, once authenticated, the servlet doesn't work ant throws:

org.xml.sax.SAXParseException: Character conversion error: "Malformed UTF-8
char
-- is an XML encoding declaration missing?" (line number may be too low).

If I deactivate authentication, things return to work fine.


How can I solve the problem?


Thank you in advance



Edu
 
E

Edu

I've found the problem (but still not the solution)!!

The problem is that from my servlet (the XSLT transformer), I request
another servlet (returns XML) which also requires authentication, so the
servlet transformer can't get the XML data and the exception is thrown when
the transformer receives the login page from the xml provider.

Now, is there a way to perform the authentication between the servlets?



Thanks again.


Edu
 
O

Oleg Tkachenko

Edu said:
The problem is that from my servlet (the XSLT transformer), I request
another servlet (returns XML) which also requires authentication, so the
servlet transformer can't get the XML data and the exception is thrown when
the transformer receives the login page from the xml provider.

Now, is there a way to perform the authentication between the servlets?
Well, AFAIR in Java such problems are usually solved using custom URIResolver,
which takes over document() function execution and implements additional
authentication job in there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top