ArrayIndexOutOfBoundsException in Tomcat 4.0.6
++; } pos++; } Am i wrong in saying that if a the buffer ends with a CR this code tries to read after it without incrementing readCount ? The funny thing is that the error is caused always when a connection comes from the proxy server (I don't know the exact details of it, I'm waiting for info about the server configuration, software, ... ) The ugly thing is that after this request tomcat seems to refuse any other request because any other request is handled by thread [0] which is in error (maybe error state is not cleaned) Any hint ? Thank you for your help Vincenzo -- I don't need to compromise my principles, because they don't have the slightest bearing on what happens to me anyway. -- Calvin - Vincenzo Marchese ARSRETIA S.r.l. Via D. Sansotta, 97 00144 Roma (IT) e-mail: [EMAIL PROTECTED] Tel.: +39 06 52270097 Fax: +39 06 52272313 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XML Information
Brandon Cruz wrote: I know this is not specifically about Tomcat, but I have seen many posts on the list from people that are using XML based applications. We are building an application that takes form data (about 4 pages worth) and stores it in a very large XML file. This data needs to be used later to render html pages, pdf files, emails, and possibly other things. We are looking into JDOM right now. What other packages are available to do this, and where should I start looking? Have a look at xerces http://xml.apache.org/xerces-j xalan http://xml.apache.org/xalan-j and for a complete rendering system xml based http://xml.apache.org/cocoon If someone can email me directly, that would be appreciated! Thanks! Brandon -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Weekends don't count unless you spend them doing something completely pointless.-- Calvin - Vincenzo Marchese ARSRETIA S.r.l. Via D. Sansotta, 97 00144 Roma (IT) e-mail: [EMAIL PROTECTED] Tel.: +39 06 52270097 Fax: +39 06 52272313 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: automatic login
Mats Nyberg wrote: Craig R. McClanahan wrote: On Fri, 10 May 2002, Mats Nyberg wrote: Date: Fri, 10 May 2002 20:00:51 +0200 From: Mats Nyberg [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: automatic login locking myself in is no problem; this is an app running on a collegue's (peter antman @ jboss) heavily patched version of a JBoss 2.something loaded with tomcat and jboss dependencies. do you know the internals of the accessinterceptor/authentification process in tomcat? I'd *better* know it, because I wrote it ... :-) straight to the source, huh ;) Look in package org.apache.catalina.authenticator in the Tomcat source code for the implementation classes that implement the various login methods. using 3.2, dude :( You'll need to understand quite a bit about Tomcat's internal architecture for this to work I do -- there are some UML diagrams and such stuff in the Catalina Documentation part of the tomcat-docs webapp. However, I'm afraid that I'm not going to be able to assist you any, due to time constraints. hey, i know i'm on a seller's market here ;) got an idea, though. I'll be back by the way, vincenzo: your idea worked - will write HOWTO for the list No doubt Mats ;) we use it in a production site :) The only potential flaw is that if you look in your browser's cache you may find the authentication form filled with username and password and that's a problem in a shared computer environment. This happens only if you perform your redirect in jsp page, maybe server-side redirecting can avoid this. Didn't try. Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- I imagine bugs and girls have a dim perception that nature played a cruel trick on them, but they lack the intelligence to really comprehend the magnitude of it. -- Calvin - Vincenzo Marchese ARSRETIA S.r.l. Via D. Sansotta, 97 00144 Roma (IT) e-mail: [EMAIL PROTECTED] Tel.: +39 06 52270097 Fax: +39 06 52272313 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: automatic login
Have you tried redirecting with an automatic post to your protected location with some javascript like: document.forms[authform].submit(); obviously after filling the form with the code you wrote down below. You can control in form-login page if you come from a registration procedure and then do the automatic post. Mats Nyberg wrote: friends, cohorts; have an application involving user registration and declarative authorization. in the end of an user registration i want the newly created user also to be logged in without providing a now you can use your new id and password to log in-screen. HOWTO? i vanely thought something like -snip- would do and now after some days in the mud i thought i'd swallow my pride and ask; how do one do this? regards snip % session.setAttribute(tomcat.auth.originalLocation, /protected/xxx.jsp); % form method=POST action=j_security_check Username: input type=hidden name=j_username value=%= userId %br Password: input type=hidden name=j_password value=%= password %br br input type=submit value=login name=j_security_check /form ---snip -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Know what I pray for? The strength to change what I can, the inability to accept what I can't and the incapacity to tell the difference.-- Calvin - Vincenzo Marchese ARSRETIA S.r.l. Via D. Sansotta, 97 00144 Roma (IT) e-mail: [EMAIL PROTECTED] Tel.: +39 06 52270097 Fax: +39 06 52272313 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: automatic login
Mats Nyberg wrote: thanks for your reply vincenzo, the problem is however not to get the form sent but rather to get tomcat/the auth.interceptor to bite. to this sollution i get a 404 /j_security_check not found after another moment of contemplation... perhapps you mean that 1. in unprotected page set session attribute my.alltogether.made.up to newlyRegisterredUser 2. go to protected page (which obviously sends me to login page 3. in login page: if(newlyRegisterredUser.equals(session.getAttribute(my.alltogether.made.up))) fill form with user details and submit That's exactly what I meant ;) and thta this would do the trick? I'll try for sure, thanx again, I'll get back to you with tales of success. Hope so Vincenzo Marchese wrote: Have you tried redirecting with an automatic post to your protected location with some javascript like: document.forms[authform].submit(); obviously after filling the form with the code you wrote down below. You can control in form-login page if you come from a registration procedure and then do the automatic post. Mats Nyberg wrote: friends, cohorts; have an application involving user registration and declarative authorization. in the end of an user registration i want the newly created user also to be logged in without providing a now you can use your new id and password to log in-screen. HOWTO? i vanely thought something like -snip- would do and now after some days in the mud i thought i'd swallow my pride and ask; how do one do this? regards snip % session.setAttribute(tomcat.auth.originalLocation, /protected/xxx.jsp); % form method=POST action=j_security_check Username: input type=hidden name=j_username value=%= userId %br Password: input type=hidden name=j_password value=%= password %br br input type=submit value=login name=j_security_check /form ---snip -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- But I don't like Spam - Vincenzo Marchese ARSRETIA S.r.l. Via D. Sansotta, 97 00144 Roma (IT) e-mail: [EMAIL PROTECTED] Tel.: +39 06 52270097 Fax: +39 06 52272313 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: XML configuration file..
you can try using an URL for your configuration file storing the xml file in your webapp/yourapp directory. InputSource sn = new InputSource(http://server/yourapp/AccessInfo.xml;); You can also limit the access to the file using standard protection methods. Another way to access you file is by putting it in the WEB-INF directory of your app and fetching an InputStream with the getResourceAsStream method of the ServletContext InputSource sn = new InputSource(oCtx.getResourceAsStream(Accessinfo.xml)); (oCtx is your ServletContext object) Cheers, Vincenzo Vijay Shinde wrote: Hi All, I am using XML configuration file for setting application properties. I am using class InputSource to load the .xml file.The problem i am facing is i need to give absolute path for my xml file e.g. InputSource sn = new InputSource(C:\\Program Files\\Apache Tomcat 4.0\\webapps\\vstruts\\AccessInfo.xml); Apache has this directory in the path C:\Program Files\Apache Tomcat 4.0\common\classes if i move my file at this path also it doesn't work .I don't know but it is not picking file from relative path . If some one help me out that will be great. Vijay -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- I have a friend whose a billionaire. He invented Cliff's notes. When I asked him how he got such a great idea he said, Well first I... I just... to make a long story short... -- Steven Wright - Vincenzo Marchese ARSRETIA S.r.l. Via D. Sansotta, 97 00144 Roma (IT) e-mail: [EMAIL PROTECTED] Tel.: +39 06 52270097 Fax: +39 06 52272313 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Jasper for simple text output
Hello everyone, I've made a series of modifications to tomcat jsp parser jasper to strip off any reference to http and servlet related reference. This ha been done to use a JSP in a simple text generation (for instance RTF) Obviously many features of JSP are no more supported (custom tag, session attributes) but you can use all the power of JSP syntax for writing your text-generation-jsp-pages. An interesting application of this is in writing jsp for RTF documents generation. You can use your preferred word processor inserting java code as in a JSP page. The only trade-off is that you have to insert special new line chars to avoid paragraph formatting in your java code (this can be done using shift-enter in StarOffice) and that you have to pre-process your rtf file to un-escape special chars (e.g.: {,}, ) before parsing it with the modified Jasper. Is anyone interested ? Vincenzo Marchese -- How many boards would the Mongols hoard if the Mongol hordes got bored? -- Calvin - Vincenzo Marchese ARSRETIA S.r.l. Via D. Sansotta, 97 00144 Roma (IT) e-mail: [EMAIL PROTECTED] Tel.: +39 06 52270097 Fax: +39 06 52272313 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]