/admin/users/ is open for source browsing

2004-06-21 Thread Ushakov, Sergey N

Hi,

I have occasionally discovered that the 'admin' app reveals its jsp folders'
contents without any password. And allows reading jspf sources afterwards...
Is it intended? ;)

And maybe a more general question - is it sound to have the default servlet
'listings' defaulting to 'true'? Perhaps it might be more safe to explicitly
allow browsing where necessary?

Regards,
Serge


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



TC5.0.25 ignores my META-INF/context.xml

2004-06-20 Thread Ushakov, Sergey N

Hi, I've just upgraded from TC4.1.12 to TC5.0.25.

Everything is OK, but TC evidently ignores my context configuration file
unless I place it directly into 'conf\Catalina\localhost\'.
It is ignored both if placed as 'webapps\my-app\META-INF\context.xml' and as
'webapps\my-app.xml'.

What is wrong? Should I fix some server setting?

Regards,
Sergey


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with passing japanese values to a servlet

2002-06-12 Thread Ushakov, Sergey N
Internationalization was common issue with Tomcat 3 (or rather with servlet
spec 2.2).

If you can forget about Tomcat 3 - do not hesitate. If you can't - try
"com.oreilly.servlet" package available at http://www.servlets.com. It
worked for me perfectly in the past (not with Japanese locale but with
Russian one - not big difference :)

Now regarding your Tomcat 4 issues.

1) The OS needs not be Japanese and needs not have Japanese as default
locale. But what definitely needs be i18n-enabled is your JRE. Are you sure
your JRE/JDK is not English-only?

2) If JRE is ok it may be a good idea to check if your OS has Japanese
encodings support (though being an English edition). It is not an issue for
Windows 2000, but for English edition it is not the default and requires
explicit expression of your wish during setup. And you can always request
for it afterwards using Control Panel. But frankly speaking I have a vague
idea how much JRE depends on OS for encoding translations.

2) Are you sure your browser sends UTF-8? Maybe try other Japanese
encodings?

HTH.
Regards,
Sergey

P.S. Keep trying... It should work :)



- Original Message -
From: "mubariz kharbe" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 12, 2002 4:03 PM
Subject: Problem with passing japanese values to a servlet


 Hi,

 I am developing an internationalized web based application using Tomcat
3.1 on Windows 2000. I am facing the following problems

 When I pass Japanese values to the servlet and I retreive the value using
 myData = httpservletrequest.getParameter("foo");
 I get ?? in myData.
 So I used
 myDataNew = new String(myData.getBytes("ISO-8859-1"),"UTF-8");
 This is the solution that is found at most forums I looked for.
 I still get the value of myDataNew as ??.
 I am able to get the correct value in myDataNew only after I boot my
server with default locale as Japanese. But I cannot do that since my
application is web based and needs to have support for all the languages. So
the server should necessarily be on English OS. This is also the business
requirement.

 Question 1. What should be done so that running the server on English OS I
will be able to get the correct value in myData for all the languages,
specially Japanese?

 The new tomcat 4.0.3 uses the Servlet Engine 2.3 in which there is a
facility to set the character encoding for the httpservletrequest. I
upgraded my tomcat server to 4.0.3.
 Now I tried using
 httpservletrequest.setCharacterEncoding("UTF-8");
 myData = httpservletrequest.getParameter("foo");
 And I am still getting the value of myData as ?? for Japanese values.

 Question 2. Is there a problem in the way I am using
httpservletrequest.setCharacterEncoding method? What else is needed to be
done?

 Any advice will be greatly appreciated.

 Thanking in anticipation
 Regards
 Mubariz









 --
 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]


HttpSessionContext deprecation reasons

2002-06-11 Thread Ushakov, Sergey N

Hi, we know HttpSessionContext is deprecated now as claimed to be unsecure.

Meanwhile it is very useful for some tasks. It is also not a big deal to
implement it in a propriatary web app.

But does anyone know of the reasons for deprecation? I could find any trace
of them...

Are the security issues really big? Should I think twice before I deploy an
app with such a mechanism inside?

Regards,
Sergey


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Listener Objects

2002-06-11 Thread Ushakov, Sergey N

I have just recently merged in the issue...

My results (not necessarily perfect :) are:
- all listener objects are to be declared in web.xml;
- it seems they are instantiated automatically along with the web app;
- it may be a good idea to implement a listener as a special class,
independent of any servlets;
- a good servlet-to-listener communication point is ServletContext;
- to arrange this communication a listener may implement also
ServletContextListener and in its contextInitialized() register itself with
the ServletContext using setAttribute ();
- a servlet can then get reference to the listener via
getServletContext().getAttribute();

The reason of your troubles (if I understood you correct) may be that you
really have two servlet+listener instances. One is instantiated as listener
an so its init is never invoked; the other is instantiated as servlet and
does not get listener events.

Regards,
Sergey

- Original Message -
From: Ralf Mitschke [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 12, 2002 2:41 AM
Subject: Listener Objects


 Hi!

 I would like to know how Listener Objects are instantiated.

 And here's my reason :-)
 My Class extends HttpServlet and I tried to deal with SessionEvents in the
same Class.
 So I implemented HttpSessionListener.
 But when the sessionCreated/sessionDestroyed methods get the Event any
changes made in the Servlet are gone.

 For Example: I use a debuging Object of my own, which I instantiate in the
Servlet init method. In sessionCreated the Instance is gone and the
Reference is null.

 My Guess is that I am dealing with 2 different Object instaces.
 Are the Listener Objects specified in the web.xml instantiated for
themselves?

 If so, i could split the Class and encapsulate the session stuff I need to
do in another Object.
 But could you suggest a method to communicate between my servlet and my
sessionListener?

 Thanks for your time :-)

 Ralf



 --
 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]




file upload using POST

2002-06-06 Thread Ushakov, Sergey N

Sorry, I'm sure my question is a FAQ, but I still can't find an answer.

Does Jakarta/Tomcat have a standard facility for file upload processing
using POST?

I have searched the Tomcat 4 docs, but did not find any trace.

JGuru mentions the org.apache.tomcat.request.ParseMime class, but it seems
to be absent from present Tomcat release. And from CVS tree also.

Seems that most people use Jason Hunter's MultipartRequest . Is it the best
choice for Tomcat?

Regards,
Sergey Ushakov


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: tomact not staring

2002-06-06 Thread Ushakov, Sergey N

bad command suggests that most likely something is wrong with JAVA_HOME...

But to make sure I can suggest the following:
1) modify catalina.bat so that the first line becomes echo on instead of
@echo off
2) start Tomcat again and watch the batch file output
3) have a good look at the lines preceding bad command message

I'm sure you will see what the bad command is... :)

Regards
Sergey

- Original Message -
From: puneet sachar [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, June 06, 2002 10:55 PM
Subject: tomact not staring


 what ever is neede ...i have set all java homes and
 catalina home..

 and its picking it up also
 but when it is abt to satrt the tomcat
 amessage come..
 bad command of file name

 seriously is tomcat 4.0.4 is for Nt users
 cos its written in startup.bat file ..

 NT users...

 plz help me
 Puneet

 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup
 http://fifaworldcup.yahoo.com

 --
 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]




Re: Classpaths

2002-06-06 Thread Ushakov, Sergey N

I understand this is not the answer you expect, and I would like to know the
right answer to your question also, but still...

If moving the classes is too crude, can you afford  making a copy of your
.jar(s) or class tree(s) ?  :)))
I have been doing it this way till now...

Regards,
Sergey

- Original Message -
From: Muñoz Ordenes Andrés (Casa Matriz) [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Friday, June 07, 2002 12:41 AM
Subject: RE: Classpaths


 -Mensaje original-
 De: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
 Enviado el: Thursday, June 06, 2002 4:39 PM
 Para: Tomcat Users List
 Asunto: RE: Classpaths


 Howdy,

 How can i do for add classes to Tomcat Classpath?... i have an
 application

 The short answer: in many many ways ;)

hahahahaha... :D

 The long answer: depends on where you want the classes to be visible.
 If you just want them for one web-app, add them to that web-app's
 /WEB-INF/classes directory.  Or package them as a jar and add them to
 the /WEB-INF/lib directory.

I can't do this... i mean, i must no move classes

 If you want the classes to be visible to more than one
 web-app, you can
 put them in $CATALINA_HOME/classes, or again package them up as a jar
 and put them in $CATALINA_HOME/lib.

Mmmm... i have Tomcat 3.3... and i can't move classes...

Another chance?

Atte.
Andrés Muñoz O.
Fono: 690 3155


--
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]




RE: Classpaths

2002-06-06 Thread Ushakov, Sergey N

To Andrés Muñoz:

I believe this is the right answer for your question.
It is for Tomcat 4, but perhaps if you examine in you 3.x how tomcat.bat
calls cpappend.bat you'll find your way...

Regards, Sergey


- Original Message -
From: Tia Haenni [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, June 07, 2002 2:15 AM
Subject: Re: jdk 1.4 and Oracle drivers


 Did you try adding the location of your classes12.jar to the Tomcat
 classpath? Look in tomcat_home/bin/setclasspath file. There should be
 a section near the bottom like one of the following depending on the OS:

 # Set standard CLASSPATH
 CLASSPATH=$JAVA_HOME/lib/tools.jar

 rem Set standard CLASSPATH
 set CLASSPATH=%JAVA_HOME%\lib\tools.jar



 John Gregg wrote:

 Hi all.
 
 Upon completing my most recent project I switched from jdk 1.3.1 to 1.4.
 However now I can't start Tomcat (4.0.1) because it can't find the Oracle
 jdbc driver class.  When I first started using Oracle with Tomcat, I
renamed
 the classes12.zip to classes12.jar.  Now no matter where I put
 classes12.jar, I get the same error.  I've tried lib, common/lib,
 server/lib, and webapps/project/web-inf/lib.  FWIW, I have a servlet
that
 runs at startup and tries to initialize a db connection pool.  This used
to
 work just fine and in fact still does with postgresql.jar.  I even tried
 unzipping classes12.zip and actually jarring it up.  No luck.  I've
traced
 the problem in a debugger far enough to know that the StandardClassLoader
 that should have classes12.jar in its scope doesn't.  In fact, of all the
 stuff under common (classes and lib), it's missing classes12.jar and
 jdbc2_0-stdext.jar.  Everything else is there.  I see those 2 jars
overlap
 somewhat, so I tried removing the latter to no avail.  I don't have any
 other Tomcat installations and there aren't any jar files in multiple
 locations.  I feel like I know everything about this problem but the
answer.
 
 thanks
 
 john


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]