Re: How to avoid of displaying the homep*ge file path

2001-06-21 Thread Anne Dirkse

The best part is that I'd bet it's now responding to its own posts to
the
list with the 'h word' in them. ;
Too bad it's so annoying, because otherwise it's pretty amusing.


[EMAIL PROTECTED] wrote:
 
 Yes!!!
 
 
 Kumar, Amit
 amit.kumar@gTo: '[EMAIL PROTECTED]' 
[EMAIL PROTECTED]
 s.com   cc:
  Subject: RE: How to avoid of displaying 
the homepage file path
 06/21/01
 01:10 PM
 Please
 respond to
 tomcat-user
 
 
 
 Is everyone getting this email multiple number of times?
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 21, 2001 2:06 PM
 To: [EMAIL PROTECTED]
 Subject: Re: How to avoid of displaying the homepage file path
 
 Messages with Subject ´Homepage´ are not accepted here (Homepage.HTML.vbs)



Re: JSP CUSTOM TAGS

2001-05-31 Thread Anne Dirkse

Peter --

All that you need to do is get your PageContext, then call getSession()  
on that. Then you've got your session and can retrieve stuff from it.
Here's some pseudo-code to explain:

 private PageContext pageContext;

public void setPageContext(PageContext pageContext) {
this.pageContext = pageContext;
   }

public int doStartTag() throws JspException {
   HttpSession session = pageContext.getSession();
   Object objTarget = session.getAttribute(target);
   return SKIP_BODY;
}


public void release() {
pageContext = null;

}

Hope that helps...
Anne

Peter Giannopoulos wrote:
 
 Hello all,
 
 Can anyone show me an example of accesing a session variable in a custom
 tag?
 Or at least point me towards documentation that explains it?
 
 (I have an object that I store in a session variable, I need to retrieve in
 one of my custom tags)
 
 --
  Peter Giannopoulos,Software Designer
  Gemplus Software,  Advanced Projects Group
 
  Phone: +15147322434
  Fax:   +15147322401
  Gemplus Canada Inc., Http://www.gemplus.com
 
 I hear and I forget,
 I see and I remember,
 I do and I understand.
 
 ---



Re: (EXPERTS ONLY) Bean Creation in Dispatch Servlet

2001-05-25 Thread Anne Dirkse

Hi Leon --

I had something similar happen, and it occours when I recompile the 
bean and then try to access it without restarting Tomcat.
My *guess* is that classes that are reloaded (when they have been 
loaded once then recompiled) have a different classloader.
Anyhow, restarting Tomcat has always resolved that problem for me.

Hope that helps.
Anne

 Leon Palermo wrote:
 
 Hello All,
 
 Let me preface this email by saying that I only put 'EXPERTS ONLY' so
 you hot shot programmers would actually read this email.  If you are
 reading this, it worked!
 
 I have an odd problem that I was hoping someone could help with.
 
 I have a servlet that all jsps in the system are dispatched from.  I
 create a bean in this servlet and add it to the request object like
 so...
 
 com.blah.blah.MyBean abean = (com.blah.blah.MyBean)
 Beans.instantiate(this.getClass().getClassLoader(),com.blah.blah.MyBean);
 ...
 request.setAttribute(thename, abean);
 
 I have also tried this to create the bean
 
 com.blah.blah.MyBean abean = new com.blah.blah.MyBean();
 
 and also tried to place the object in the request like so
 
 pageContext.setAttribute(thename, abean,
 PageContext.REQUEST_SCOPE);
 
 Anywho, I then have the following in my jsp page...
 
 jsp:useBean id=thename scope=request
 class=com.blah.blah.MyBean /
 
 I get a java.lang.ClassCastException from the jsp.  So, I decided to
 do a little error hunting in a jsp using the following code...
 
 %try{
 System.out.println(request.getAttribute(thename) == null);
 System.out.println(request.getAttribute(thename) instanceof
 com.blah.blah.MyBean);
 
 System.out.println(request.getAttribute(thename).getClass().getName());
 
 
System.out.println(zedak.docworx.jspsupport.beans.BrandBean)request.getAttribute(thename));
 }catch (ClassCastException e){
 System.out.println(CLASS CAST EXCEPTION!);
 }
 %
 
 The results of the code is as follows:
 
 false
 false
 com.blah.blah.MyBean
 CLASS CAST EXCEPTION!
 
 So, the attribute is present in the request object, it is not an
 instance of 'com.blah.blah.MyBean'; but the object's class name is
 'com.blah.blah.MyBean'.  Does anyone have an idea what is going on?
 How can the object's class name be 'com.blah.blah.MyBean' but not be
 able to cast to 'com.blah.blah.MyBean'?
 
 Thanks in advance!
 
 Leon Palermo



Re: how to create a war file manually

2001-05-18 Thread Anne Dirkse

Use jar. Assuming that you have your dir structure set up correctly, all
you have to do is jar them up, specify whatever.war as the file name,
and there you have it.
Anne

 Jianlin Chang wrote:
 
 How can I create a war file manually?  I know I can follow Developing
 Applications With Tomcat and use build.xml, but that seems more
 complicated, is there a simple way where I can just pack everything
 needed (jsp, html, classed) into a war file using a single command?
 Thanks.



Specification Question RE: Cookies

2001-04-27 Thread Anne Dirkse

Hi all --

I have a question regarding cookie expiriation. I am trying to expire a
cookie immediately, and the Servlet Specification (and javadoc) states
that:

  Cookie's public void setMaxAge(int expiry)
  Sets the maximum age of the cookie in seconds.
  A positive value indicates that the cookie will expire after that many
seconds have passed. Note that the
  value is the maximum age when the cookie will expire, not the cookie’s
current age.
  A negative value means that the cookie is not stored persistently and
will be deleted when the Web browser
  exits. A zero value causes the cookie to be deleted. 

My guess, based on this is that cookie.setMaxAge(0) should expire the
cookie immediately, but it seems that with Tomcat the missing step to
re-add the cookie to the response, at which point it is actually
deleted. What I'm wondering is, is this a required step? I've noticed
that Oracle implements this differently, deleting the cookie immediately
when the MaxAge is set to 0. Can anyone who is familiar with the
specification enlighten me?

Thanks,
Anne



Re: Please urgent : Why french accentual chara cters (like à è) not display

2001-04-25 Thread Anne Dirkse

Are you using the actual characters or the HTML standins for special
characthers?
If you are just typing the characters, the browser may not be able to
display them 
as is. Try using the HTML special characters.
The special characters begin with an  then the ASCII Number for the
item, then a 
semicolon, for example 151; for a dash. There are lots of HTML books
with charts of 
those. There are also some easy-to-remember shortcuts like agrave;
egrave; aacute; 
eacute; acirc; that might help.
Hope that helps.
Anne

iscnet isc wrote:
 
 Hello,
 I use tomcat, I wrote a servlet which works fine, but i have a problem in
 the french accentual characters, they always are replaced by ? character
 Can some one help me?
 
 Thank you
 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.



Re: OAS and jserv

2001-04-24 Thread Anne Dirkse

Peter -- 
Yes, you can integrate Tomcat with OAS (at least according to the
documentation I've read). I was not able to find any evidence that it
was supported, however. Given that, and the horrible performance we were
experiencing with OAS our project decided to give up on OAS altogether
(or until 9iAS looks like a reasonable option), so luckily I didn't have
to go down that path. I can dig up some documentation though, if it
would be helpful.
Anne

Peter Smith wrote:
 
 Can Oracle Application Server/Apache be integrated
 with Tomcat (presumably using mod_jk) instead of the
 JServ it ships with?  Anyone done it?
 
 I'm stuck using Oracle Application Server and I wish
 to deploy Java-based apps using Tomcat instead of the
 shipped JServ engine.  Someone has previously asked
 the list and I didn't see any reponses.  From reading
 bits and pieces I gather that it may be possible, but
 it might be hairy and it's probably not supported.
 
 I may have the option of upgrading to Oracle9iAS,
 which offers the new Oracle Enterprise Java Engine
 which looks like it does what Tomcat can.
 
 Comments?
 
 --Peter--
 
 __
 Do You Yahoo!?
 Yahoo! Auctions - buy the things you want at great prices
 http://auctions.yahoo.com/



Re: Books on Tomcat

2001-04-23 Thread Anne Dirkse

Hi All --

I'd love to join in as well. Maybe I'll finally get a chance to put that
English Degree to use! One section that I would love to see is
Troubleshooting. It seems like a lot of people have the same prolems
over and over, and a good book could hopefully address most of the
problems that people encounter. What I'd love to see is this: an intro
to Tomcat/ Setup Instructions that is hyperlinked to a troubleshooting
section. Something like:

Run the JSP examples to be sure that you have Tomcat setup correctly.

---
sun.tools.javac.Main not found?
(links to...)
Make sure that you have your JAVA_HOME environment variable set up
correctly. [Further explanation]
---

I'd volunteer to start expanding upon the setup material.

Anne


Armin Roehrl wrote:
 
 sounds good.
 Maybe we should collect a list of topics we're interested
 in.  I'd like to look at load-balancing issues.
 Armin.
 
 On Monday 23 April 2001 18:11, you wrote:
  I'm very interested in doing this, I'm not a great writer but I have
  server space we could use to put it online.  I could setup WebDAV for a
  group of authors and we could ask for feedback as each section is done.
 
  Ed
 
  Penberthy, Bill wrote:
   Count me in.  I am not a Tomcat expert - but I writez purty good and am
   the ultimate test subject to see if it is clear enough so that even an
   idiot can figure it out
  
   Bill Penberthy
   Sr. Functional Architect/Idiot
   IQNavigator
  
   -Original Message-
   From: David McCormick [mailto:[EMAIL PROTECTED]]
   Sent: Monday, April 23, 2001 10:44 AM
   To: '[EMAIL PROTECTED]'
   Subject: RE: Books on Tomcat
  
   I've been thinking about scratching that itch myself. Somewhere on this
   list I read that the Tomcat developers (whoever that might mean) were
   already working on one, but I haven't seen anything else since then. I
   think it would be interesting to do it like Bruce Eckel has done with his
   books (http://www.bruceeckel.com), where he publishes chapters and gets
   immediate feedback on clarity and correctness.
  
   Count me in.
  
   -Original Message-
   From: Bryant, William [mailto:[EMAIL PROTECTED]]
   Sent: Monday, April 23, 2001 11:29 AM
   To: [EMAIL PROTECTED]
   Subject: RE: Books on Tomcat
  
   Hmmm...  No books that I know of, either already published or in
   progress.
  
   I'm not much of an author, but this sounds like an interesting project.
   Anyone up for writing a book on Tomcat?  Maybe a not-for-profit,
   electronic-format-only guide to Tomcat that users could download.  We
   could take the existing documentation (good, however maybe a little
   sparse) and add to it.
  
   I've been wanting to get into the Tomcat project for some time now.  This
   might be the perfect opportunity.
  
   Any takers?
  
   .. Mike
  
  
  
   -Original Message-
   From: Will England [mailto:[EMAIL PROTECTED]]
   Sent: Monday, April 23, 2001 11:04 AM
   To: [EMAIL PROTECTED]
   Subject: Books on Tomcat
  
   Hi!
  
   Does anyone know of any dead-tree books that document the Tomcat
   platform
  
   I've checked O'Reilly and Amazon, with no luck.  I've found a few simple
   basic articles, but that is it.
  
   Thanks in advance!
  
   Will
  
   --
 If Al Gore invented the Internet, then I invented spellcheck!
 Dan Quayle, quoted at the National Press Club, 8/3/1999
 [EMAIL PROTECTED]
 Recovery  : http://will.mylanders.com/ PCS:  316-371-FOAD
 
 --
 Armin
 
 ---
 Armin Roehrl  [EMAIL PROTECTED]
 Approximity Ltd.  http://www.approximity.com
 http://www.approximity.com/pgp/armin_roehrl.pgp



Re: Tomcat Windows NT IIS

2001-04-23 Thread Anne Dirkse

Hamant --
What errors are you encountering when trying to get a jsp example to
run?
Anne

test test wrote:
 
 Hello all
 
 Some progress has been made - I now get the example servlets working but not
 the JSP examples.
 
 Have been through the instructions several times and the troubleshooting
 section.
 
 Still stuck, does anyone have any suggestions ?
 
 Many thanks
 
 Hamant
 
 -Original Message-
 From: Craig O'Brien [mailto:[EMAIL PROTECTED]]
 Sent: Monday, 23 April 2001 14:28
 To: [EMAIL PROTECTED]
 Subject: RE: Tomcat  Windows NT  IIS
 
 Good,
 
 So you have tomcat running and can view the JSP and Servlet examples using
 port 8080.  (localhost:8080/)  Do not add any contexts yet.  First you want
 to get the isapi_redirect.dll installed so that you can call the examples
 directly without referencing the port. If you haven't downloaded this yet
 get the binary from the apache site.  There are several steps to follow in
 the IIS how to instructions.  Again follow them explicitly.  You will need
 to register the isapi _redirect.dll with IIs, modify your registry (be very
 careful!!), create a directory to place the isapi redirect into, and modify
 your workers properties file. (tomcat/conf/workersproperties)  I am doing
 this by memory so follow your instructions carefully. Most people make their
 errors in the registry settings. Again it is so much easier if you print out
 the instructions.
 
 If you want to test some jsps or servlets that you have already made before
 you have the isapi working, place the jsps into the ROOT directory and call
 them with (localhost:8080/yourjspname.jsp).  Servlets must be placed in the
 WEB_INF/classes directory and are referenced by
 (localhost:8080/servlet/yourservletname_noextention).  Spend a little time
 getting familiar with the directories.  All of your web apps go under the
 webapps/ROOT directory. You will know if isapi is working when you can drop
 the port reference and still get them.
 
 Sounds like you are getting there. Go one small step at a time, test your
 results, then proceed.  By the time you install tomcat for the 3rd or 4th
 time it will only take 30 minutes.  Print out all of the conf files.  All
 your tomcat configuration is done through modifying them. They are well
 documented with comments.
 
 Tomcat adheres strictly to the Sun jsp/servlet APIs so those documents are
 worth getting familiar with as well.
 
 Good luck,
 Craig
 
 It's late here, I'm out for the night.
 
 -Original Message-
 From: test test [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, April 22, 2001 8:35 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: Tomcat  Windows NT  IIS
 
 Craig
 
 Thank you for your advice.
 
 I have been through the instructions on IIS (tomcat-iis-howto.html).
 
 However, I still cannot get the examples to work under IIS (they work fine
 with Tomcat),
 
 I have been through the trouble shooting section with no luck.
 
 I have not added any contexts as I can't get the examples to work.
 
 Not sure what to do now, please help !
 
 Thanks
 
 Hamant
 
 -Original Message-
 From: Craig O'Brien [mailto:[EMAIL PROTECTED]]
 Sent: Monday, 23 April 2001 11:37
 To: [EMAIL PROTECTED]
 Subject: RE: Tomcat  Windows 2000
 
 More information is needed if anyone is to help you.
 
 The documentation in the tomcat download is very good.  Tomcat works well
 with Windows 2000 and IIS and many other operating systems.  Tomcat is 100%
 java.
 
 If you haven't found the documentation it is in the doc directory.  Print it
 out and follow it explicitly. (print out the documentation, use a pencil to
 mark your steps.) If you have problems relay the steps you have taken and
 what error messages you are getting. The more detail the better.
 
 Regards,
 Craig
 
 -Original Message-
 From: test test [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, April 22, 2001 5:00 PM
 To: '[EMAIL PROTECTED]'
 Subject: FW: Tomcat  Windows 2000
 
   -Original Message-
  From: test test
  Sent: Thursday, 19 April 2001 15:45
  To:   '[EMAIL PROTECTED]'
  Subject:  Tomcat   Windows 2000
 
  hello
 
  Can anybody please tell me how I can get Tomcat to work with Windows 2000
  (using IIS web server).
 
  I have searched the user archives - similar questions have been raised but
  I can't see the answers.
 
  Please help
 
  Many thanks
 
  Hamant



Re: file upload servlet

2001-04-22 Thread Anne Dirkse

My guess is that you have an extra  somewhere (or that you missed the 
at action=%=)

Anne

Christoph Kukulies wrote:
 
 On Fri, Apr 20, 2001 at 06:58:26PM +0200, Ralph Einfeldt wrote:
  For a pure HTML solution you need two things:
 
  a form with at least one file input tag:
 
  form enctype="multipart/form-data" action=%=
  response.encodeUrl("'path-to-your-servlet'") % method="post"
  input type="file" name="FileData" value="" size="52" maxlength="255"
  /form
 
 This is looking very elegant to me. I tried it but I'm getting
 
 method="post"
 
 at the beginning of the page when it appears in the browser.
 
 Is there a typo (or some mail agent added something, like a '=' sign?)
 or am I missing something more severe?
 
 --
 Chris Christoph P. U. Kukulies [EMAIL PROTECTED]



Re: file upload servlet

2001-04-22 Thread Anne Dirkse

Christoph --
You do need the trailing = after %
Here's why:
What you are trying to send from your HTML form is something like this:

form enctype="multipart/form-data" action="/servlets/servlet/Upload"
method="post"
input type="file" name="FileData" value="" size="52" maxlength="255"
input type="submit" value="Abschicken"
/form

The %= % is a jsp Expression, which means that the value of whatever
is in it will be converted to a String and then printed out. Since this
is done before the HTML is processed, what you get is something like in
the above example.
As you have it below, with % %, you are not ever actually including
the value of your encoded URL into your form.
It's just a scriptlet, which will actually encode your URL, but to no
avail, since it has no explicit String conversion or printout
capabilities and thus won't be a part of your form.

all the %= response.encodeURL("/path/to/Servlet") % is doing is
rewriting your URL to include session data if cookies are not enabled.
For a first shot at it, you might want to consider just building a set
of tags like I included above and making sure that works (make sure you
have cookies enabled, though!) After you have that working, it might be
a lot easier to get your session encoding working, conceptually. 

What the leftover method="post" signals to me is that somewhere you are
closing the form tag before this part of it, i.e., that the browser
encounters a  before it encounters method="post" and thus assumes that
the form tag has been completed and that method="post" is regular text
to be printed to the browser window.

Hope that helps,
Anne

Christoph Kukulies wrote:
 
 On Sun, Apr 22, 2001 at 11:05:44AM -0700, Anne Dirkse wrote:
  My guess is that you have an extra  somewhere (or that you missed the 
  at action=%=)
 
 The trailing = looks like being added by the mailer.
 
 It seems to me that I'm missing something more essential. I'm running
 tomcat 3.2 beta. The (jsp) examples all seem to work.
 
 Even written like this:
 html
 form enctype="multipart/form-data" action=%
  response.encodeUrl("/servlets/servlet/Upload")
 %
 method="post"
 input type="file" name="FileData" value="" size="52" maxlength="255"
 input type="submit" value="Abschicken"
 /form
 /html
 
 doesn't change the picture.
 
 
  Anne
 
  Christoph Kukulies wrote:
  
   On Fri, Apr 20, 2001 at 06:58:26PM +0200, Ralph Einfeldt wrote:
For a pure HTML solution you need two things:
   
a form with at least one file input tag:
   
form enctype="multipart/form-data" action=%=
response.encodeUrl("'path-to-your-servlet'") % method="post"
input type="file" name="FileData" value="" size="52" maxlength="255"
/form
  
   This is looking very elegant to me. I tried it but I'm getting
  
   method="post"
  
   at the beginning of the page when it appears in the browser.
  
   Is there a typo (or some mail agent added something, like a '=' sign?)
   or am I missing something more severe?
  
   --
   Chris Christoph P. U. Kukulies [EMAIL PROTECTED]
 
 --
 Chris Christoph P. U. Kukulies [EMAIL PROTECTED]



Re: newbie

2001-04-18 Thread Anne Dirkse

Congratulations -- Looks like you set it up correctly.
The lag that you notice the first time you visit a jsp is normal.
What is happening is that JSP is being compiled into a servlet (which is
what JSPs do)
That will only happen the first time you access the JSP (unless you
modify the source.)
Anne

[EMAIL PROTECTED] wrote:
 
 Hi .. I'm newbie in jakarta (tomcat)
 
 I Just setting Up my Apache with jk_mod (tomcat)  in linux
 but I found problems
 When FIRST time loading JSP,
 e.g lynx http://localhost/examples
 It's take a long time ( half a minute) to loading fisrt jsp page, but after
 that evertyng goes fine ???
 
 My conf just follow from doc in jakarta.apache.org
 
 Any body wanna help me ?



Re: WML and JSP

2001-04-18 Thread Anne Dirkse

Check out cocoon:
http://xml.apache.org/cocoon/index.html
A.

--

Yes, it is possible. Look at the User-Agent parameter that is passed in
via the http request headers and do the apprpriate thing based on that.
 
- Ray

 -Original Message-
 From: Paul Yoon [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, April 18, 2001 12:13 PM
 To: [EMAIL PROTECTED]
 Subject: WML and JSP

   Hello, 

   I am an user of Tomcat.
   I would like to make a few page for mobile user.
   Is it possible that HTTP users  and WAP users  can access
same URL and get their own services?
   If it is, how it can be possible? How tomcat server know
the difference?
   Thank you in advance.

   Paul



Tomcat on Solaris

2001-04-06 Thread Anne Dirkse

Hi All --

I'm trying to install Tomcat on Solaris 8 (sparc) and am running into
problems.

I'm running Tomcat 3.2.1, with java 1.2.2:
java version "1.2.2"
Solaris VM (build Solaris_JDK_1.2.2_06, native threads, sunwjit)

I have tomcat installed and running happily (more or less) on an
identical (or so I thought!) machine.

First I tried installing from a newly downloaded .tar.gz and got the
following exception:
 
Exception in thread "main" java.lang.ExceptionInInitializerError:
java.util.Mi
ssingResourceException: Can't find resource for base name
org.apache.tomcat.reso
urces.LocalStrings, locale en
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.init(Throwable.java:94)
at java.lang.Exception.init(Exception.java:42)
at java.lang.RuntimeException.init(RuntimeException.java:47)
at
java.util.MissingResourceException.init(MissingResourceException.java:54)
at java.util.ResourceBundle.getBundle(Compiled Code)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:339)
at
org.apache.tomcat.util.StringManager.init(StringManager.java:115)
at
org.apache.tomcat.util.StringManager.getManager(StringManager.java:260)
at Unloaded Method

Given that, tried tarring up my working tomcat from the other solaris
box and moving it over, and got the same exception.

All of my environment settings between the two Solaris machines *should*
be identical.
In fact, the machine that does work was, two weeks ago, an exact copy of
the one that is failing...

Has anyone run into something similar before? If so, I'd be thrilled to
hear a fix.

Thanks,

Anne
[EMAIL PROTECTED]