Re: Orion and Cocoon anyone

2001-03-02 Thread theis . meggerle

Try this:

Rename the xerses.jar to xersesold.jar (under orion)
Copy cocoons xerses.jar to the orion lib.

Unpack the cocoon.jar.
Change the cocoon.properties to this:
processor.xsp.logicsheet.context.java   = 
file://localhost/orion/default-web-app/web-inf/lib/org/apache/cocoon/processor/xsp/library/java/context.xsl
processor.xsp.logicsheet.cookie.java= 
file://localhost/orion/default-web-app/web-inf/lib/org/apache/cocoon/processor/xsp/library/java/cookie.xsl
processor.xsp.logicsheet.global.java= 
file://localhost/orion/default-web-app/web-inf/lib/org/apache/cocoon/processor/xsp/library/java/global.xsl
processor.xsp.logicsheet.request.java   = 
file://localhost/orion/default-web-app/web-inf/lib/org/apache/cocoon/processor/xsp/library/java/request.xsl
processor.xsp.logicsheet.response.java  = 
file://localhost/orion/default-web-app/web-inf/lib/org/apache/cocoon/processor/xsp/library/java/response.xsl
processor.xsp.logicsheet.session.java   = 
file://localhost/orion/default-web-app/web-inf/lib/org/apache/cocoon/processor/xsp/library/java/session.xsl
processor.xsp.logicsheet.sql.java   = 
file://localhost/orion/default-web-app/web-inf/lib/org/apache/cocoon/processor/xsp/library/sql/sql.xsl
processor.xsp.logicsheet.esql.java  = 
file://localhost/orion/default-web-app/web-inf/lib/org/apache/cocoon/processor/xsp/library/sql/esql.xsl
processor.xsp.logicsheet.fp.java= 
file://localhost/orion/default-web-app/web-inf/lib/org/apache/cocoon/processor/xsp/library/fp/fp.xsl

A strange solution but it works!

/Theis.





Storing HttpServletRequest Object in Session

2001-03-02 Thread Santosh Kumar



Hi all,
 I tried to store 
the implicit request object in session. But when i tried to retrieve 
it.


one.jsp
--

...
...

 request.setAttribute("ONE", "1");

 request.setAttribute("TWO", "2");
..
..
 session.setAttribute("request",request);
..
 -- forward to two.jsp


two.jsp
--
  request= 
(HttpServletRequest) session.getAttribute("request");
  out.println((String) 
request.getAttribute("ONE"));

  out.println((String) 
request.getAttribute("TWO"));


Both the print statements are returning null..i was expecting 1 
and2 WHY


Regards,
Santosh



 



EJBQL

2001-03-02 Thread fresnaULL



Does Orion provide support for EJBQL? Which Orion 
version?
Is Orion full EJB 2.0 compliant?

Thanks in advance


RE: need help getting started

2001-03-02 Thread Randahl Fink Isaksen

 my main reason for switching was that orion is much faster than tomcat.
 Isn't that so?

Now, where did you here that ??


Randahl








But, you are right, I had the feeling that it was way over kill...I am also
looking into resin, I guess that is over kill, too for functionality, but
like I said I was looking for speed gains.

- Original Message -
From: "Randahl Fink Isaksen" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Thursday, March 01, 2001 2:10 PM
Subject: RE: need help getting started


 I would definately *NOT* recommend moving away from Tomcat if you only use
 JSP and servlets. Tomcat is the reference implementation, it is free, and
 unless you need a product with a lot of additional features (GUI helper
 tools, EJBs, remote debugging, etc.) there is no reason to open up a can
of
 worms.
 I really like the Orion server but that is for its EJB capabilities. I
think
 the Orion team strives for making it a great EJB server. - The aim is not
 specifically to make it the best JSP/Servlet platform available, so I
would
 not expect it to be ahead of Tomcat in that sence.
 Orion is a great product, but also a more complicated product, so if you
can
 use a less complex system and still fulfill your needs, then I sure
 recommend you do so.

 However, should you get to the point where you simply don't think using
just
 a relational database and several truck loads of SQL really makes your
day,
 THEN JOIN THE CLUB - that is why many of use Orion Server and Enterprise
 Java Beans.

 Yours Sincerely

 Randahl
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of John de la
 Garza
 Sent: 1. marts 2001 19:01
 To: Orion-Interest
 Subject: need help getting started


 I have been using tomcat for some time now and am having issues with it...


 I am thinking about using Orion.  I don't do any ejb stuff and only need a
 servlet container and web server.

 I am having trouble using formbased security.  I couldn't get it to work
 with the users set up in the principals file.  When I would go to a
 protected area I would just get a message saying 'not allowed here' or
 something like that but I would not get prompted for a pw username.


 I actually don't want to use the principals file but have the usernames
and
 passwds in a data base.

 Can anyone here refer me to some documentation on this?








Java ftp

2001-03-02 Thread John Miller

Off topic, but does anyone know a way of using Java for FTP'ing?

Johnny


BUY YOUR 2001 ISA AT INTERACTIVE INVESTOR'S NEW ISA CENTRE - visit 
http://www.iii.co.uk/isa for a choice of 400+ funds, market leading
discounts 
and access to expert advice. 

FANCY A FREE ISA? Enter our competition now at http://www.iii.co.uk/isa 
Terms and Conditions apply and are available online. 
Issued by Interactive Investor Trading Limited, regulated by the SFA.




RE: CMP 2.0

2001-03-02 Thread Randahl Fink Isaksen

The bug has been entered into the system as bug #349. It includes a thorough
description.

R.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Randahl Fink
Isaksen
Sent: 1. marts 2001 22:48
To: Orion-Interest
Subject: RE: CMP 2.0


God point - I'll report it as a bug in Bugzilla.


Randahl

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jeff Schnitzer
Sent: 1. marts 2001 12:16
To: Orion-Interest
Subject: RE: CMP 2.0


I've heard comments on this list in the past from Karl  Magnus that
bad, misleading, or missing error messages should be logged in Bugzilla
as bugs.

http://www.orionserver.com/bugzilla

:-)

Jeff

-Original Message-
From: Randahl Fink Isaksen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 01, 2001 1:19 AM
To: Orion-Interest
Subject: RE: CMP 2.0


As I just posted, Jeff. The error was due to the fact that I
had declared my
primary keys as Integer but I returned the primitive type int from my
ejbCreate methods. As soon as I changed this, everything
worked fine. I am
(to put it mildly) very surprised that Orion did _not_ give me
a compile
time error when I deployed - it just crashed instead or ran
without working
correctly.
Yes I know who introduced the bug, but since I think Orion is
a magnificent
piece of software I would never had expected it to NOT report
this compile
time error.


Randahl

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jeff
Schnitzer
Sent: 1. marts 2001 02:42
To: Orion-Interest
Subject: RE: CMP 2.0


?

I have all my transactional behavior defined as NotSupported and I use
EJB 2.0 container managed relationships without issue.  I don't
currently need transactions for what I'm doing.

Randahl, have you examined the contents of the database tables and the
orion-ejb-jar.xml closely?

Jeff

-Original Message-
From: Tim Drury [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 8:34 AM
To: Orion-Interest
Subject: RE: CMP 2.0




I've been out for a few days, so it this has been answered,
sorry for the repost.

This sounds like you didn't set the transactional behavior
in ejb-jar.xml as "required".  There is no default behavior
in the spec so it is up to the container to decide what
the default behavior is.  I know in Weblogic, transactions
default to "supports" (I think).  In any event, the entities
are not stored in the database unless you mark them
as "required".  Orion may be doing the same thing.

-tim


 -Original Message-
 From: Randahl Fink Isaksen [ mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ]
 Sent: Monday, February 26, 2001 5:29 AM
 To: Orion-Interest
 Subject: CMP 2.0


 Would somebody please confirm that they have been able to use CMP 2.0
 relationships on Orion, that they have seen them get stored
 in the database
 AND brought back into main memory correctly after a restart
 of the server.

 When I create a relationship it works fine until I restart -
 I simply can't
 make Orion restore my relationships from the keys it stores
 in the database.
 If I try the getX() / method of a cmr property it works - but after a
 restart it returns null.


 R.











RE: Struts (was: I switch from X to Orion because: )

2001-03-02 Thread Manne Fagerlind

Wouldn't it have been easier to just subclass ResourceBundle or one of its
subclasses:

public class SerializableResourceBundle implements Serializable

or am I missing something obvious?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 01 March 2001 18:51
To: Orion-Interest
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Struts (was: I switch from X to Orion because: )



The reason for reimplementing ResourceBundle as MessageResources is that
ResourceBundle is not Serializable.  Some containers, notable WebLogic 6,
have
issues with non-serializable objects being stored in things like the
application
and session context.  Its also very important that you only throw
Serializable
things in there espacially if you plan on using the distributable / tag in
your web.xml.

mark

Mark R Mascolino
The Procter  Gamble Co.
[EMAIL PROTECTED]



 Internet Mail Message  
 Received from host:



 

  "Jeff Schnitzer"

 [EMAIL PROTECTED]To:
Orion-Interest 
  Sent by:
[EMAIL PROTECTED]
  [EMAIL PROTECTED]cc: (bcc: Mark
Mascolino-MR/PGI)
  Subject: Struts
(was: I switch from X to
 02/28/01 08:25 PMOrion because: )

  Please respond to Orion-Interest

 

 





This subject is especially timely for me because I just finished
evaluating both WebWork and Struts.  I decided to go with WebWork.  It
wasn't so much that I was drawn to WebWork's technological coolness -
there are some neat ideas there, but I think most could be adapted into
Struts with a little effort.  The problem was that when I looked deeply
into Struts, I didn't like what I saw.

I spent a *lot* of time wavering; on one hand, Struts has a solid user
community and good javadocs, on the other hand, WebWork is simpler and
easier to teach future members of the team.  I kept switching my favor
back and forth when I discovered something new I did or didn't like.
What finally pushed me over the edge was my experience hunting down the
problem preventing Struts from working with Orion out of the box.
Here's the story:

If you've ever tried loading the Struts 1.0 example app, you are
immediately confounded by missing resource errors.  There is a lot of
complaint in the Orion and Struts archives about this, but the closest
anyone has come to nailing it down is this message:

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg00582.html

in which the principal author of Struts, Craig, implies that Orion's
classloader has a problem preventing it from working with the standard
JDK ResourceBundle.  I knew there was something wrong with this because
WebWork uses ResourceBundle without issue.

So I looked through Struts' source to see how it might be using
ResourceBundle differently, and what I discovered is that Struts doesn't
use ResourceBundle at all!  In fact, Struts has a whole homebrewed
framework for handling properties which mirrors the ResourceBundle API
but doesn't use any of its classes or interfaces.  There are javadoc
comments to the effect that the Struts code should be faster than
ResourceBundles, but looking at the JDK 1.3 source code, both frameworks
seem to be doing pretty much the same thing.

For those curious, the actual problem with Orion is that Struts uses
ClassLoader.getResourceAsStream() to build the Properties object, and (I
checked the decompiled code) the Orion classloader does not implement
getResourceAsStream().  Orion's fault, and logged as bug #340.

But why re-invent the wheel?!?  The JDK provides resource management for
us!  Even if the Struts code was slightly faster (which I doubt), any
performance gain is going to be negligable compared to the amount of
time spent processing taglibs, etc.  I can't believe that whoever wrote
the Struts MessageResources classes ever bothered to run the code
through a profiler to find out where the real bottlenecks are.  All this
extra code and duplicated infrastructure is nothing but an opportunity
for more bugs, IMHO.

At this point I decided to go with WebWork.  It is certainly not without
issues as well, but I'm very happy with the results.  And I am finding
that in a framework this simple, fundamental changes are easy to make.

I could elaborate on the differences between WebWork and Struts if
anyone is really interested.  If you're still writing JSP-centric
applications, you *really* should look into an MVC framework.

Jeff

-Original Message-
From: Arved Sandstrom [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 1:42 PM
To: Orion-Interest

RE: need help getting started

2001-03-02 Thread Dumitru Sbenghe

You don't need to hear, you feel that;

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Randahl Fink
 Isaksen
 Sent: Friday, March 02, 2001 11:23 AM
 To: Orion-Interest
 Subject: RE: need help getting started


  my main reason for switching was that orion is much faster than tomcat.
  Isn't that so?

 Now, where did you here that ??


 Randahl








 But, you are right, I had the feeling that it was way over
 kill...I am also
 looking into resin, I guess that is over kill, too for functionality, but
 like I said I was looking for speed gains.

 - Original Message -
 From: "Randahl Fink Isaksen" [EMAIL PROTECTED]
 To: "Orion-Interest" [EMAIL PROTECTED]
 Sent: Thursday, March 01, 2001 2:10 PM
 Subject: RE: need help getting started


  I would definately *NOT* recommend moving away from Tomcat if
 you only use
  JSP and servlets. Tomcat is the reference implementation, it is
 free, and
  unless you need a product with a lot of additional features (GUI helper
  tools, EJBs, remote debugging, etc.) there is no reason to open up a can
 of
  worms.
  I really like the Orion server but that is for its EJB capabilities. I
 think
  the Orion team strives for making it a great EJB server. - The
 aim is not
  specifically to make it the best JSP/Servlet platform available, so I
 would
  not expect it to be ahead of Tomcat in that sence.
  Orion is a great product, but also a more complicated product, so if you
 can
  use a less complex system and still fulfill your needs, then I sure
  recommend you do so.
 
  However, should you get to the point where you simply don't think using
 just
  a relational database and several truck loads of SQL really makes your
 day,
  THEN JOIN THE CLUB - that is why many of use Orion Server and Enterprise
  Java Beans.
 
  Yours Sincerely
 
  Randahl
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]On Behalf Of John de la
  Garza
  Sent: 1. marts 2001 19:01
  To: Orion-Interest
  Subject: need help getting started
 
 
  I have been using tomcat for some time now and am having issues
 with it...
 
 
  I am thinking about using Orion.  I don't do any ejb stuff and
 only need a
  servlet container and web server.
 
  I am having trouble using formbased security.  I couldn't get it to work
  with the users set up in the principals file.  When I would go to a
  protected area I would just get a message saying 'not allowed here' or
  something like that but I would not get prompted for a pw username.
 
 
  I actually don't want to use the principals file but have the usernames
 and
  passwds in a data base.
 
  Can anyone here refer me to some documentation on this?
 
 
 






Re: Java ftp

2001-03-02 Thread Marcel Schutte

See http://www.savarese.org/oro/ I think that's the library that is used by
the optional ftp task in Ant.

Marcel

- Original Message -
From: "John Miller" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Friday, March 02, 2001 10:47 AM
Subject: Java ftp


 Off topic, but does anyone know a way of using Java for FTP'ing?

 Johnny


 BUY YOUR 2001 ISA AT INTERACTIVE INVESTOR'S NEW ISA CENTRE - visit
 http://www.iii.co.uk/isa for a choice of 400+ funds, market leading
 discounts
 and access to expert advice.

 FANCY A FREE ISA? Enter our competition now at http://www.iii.co.uk/isa
 Terms and Conditions apply and are available online.
 Issued by Interactive Investor Trading Limited, regulated by the SFA.







Re: EJBQL

2001-03-02 Thread Ray Harrison

The latest information in hand that I know of is that no - they do not support EJBQL - 
although
that may have changed recently. Not sure that I know of any app server that is fully 
EJB2.0
compliant as yet...

Cheers
RHH
--- fresnaULL [EMAIL PROTECTED] wrote:
 Does Orion provide support for EJBQL? Which Orion version?
 Is Orion full EJB 2.0 compliant?
 
 Thanks in advance
 


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




Re: configuring an application

2001-03-02 Thread Rafael Alvarez

Hello G.L.,

you need to put the following in your server.xml:

application name="cais" path="/u/build/"/


And create an application.xml file in /u/build/META-INF

?xml version="1.0"?
!DOCTYPE application
PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN"
"http://java.sun.com/j2ee/dtds/application_1_2.dtd"

application
   display-nameC.A.I.S/display-name
   descriptionApplication description/description
   module
 web
web-uricais-web/web-uri
 /web
   /module
/application


-- 
Best regards,
 Rafaelmailto:[EMAIL PROTECTED]






Re: EJB values into xml attributes (a little off topic, I know)

2001-03-02 Thread Falk Langhammer

Hi Randahl,

- Original Message -
From: "Randahl Fink Isaksen" [EMAIL PROTECTED]
 XMLEscaper.escape(Book.getPreface()) for all the output you take from your
 beans and use to generate XML really sounds like a mess to me.
 While we are at it: If you just *have* to do this conversion, why not do
it
 when you put information into the beans rather than when you take it back

Well, we do need unescaped string properties in the beans to do the business
logic right. If a companies name is "Smith  Wesson" it is not "Smith amp;
Wesson". Think that somebody is searching for this company in an EJB-client.

As a general note, the entire problem belongs to the topic of "Java object
- XML mapping". This is much researched right now with no de-facto
standard I know of yet. There is a SUN community process for this topic.
Until then, I suggest at least JDOM should handle Java Strings internally.

Bye,
Falk





RE: Java ftp

2001-03-02 Thread John Miller

Thanks lots. Nice library, it's a great help.

Johnny

-Original Message-
From: Marcel Schutte [mailto:[EMAIL PROTECTED]]
Sent: 02 March 2001 12:14
To: Orion-Interest
Subject: Re: Java ftp


See http://www.savarese.org/oro/ I think that's the library that is used by
the optional ftp task in Ant.

Marcel

- Original Message -
From: "John Miller" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Friday, March 02, 2001 10:47 AM
Subject: Java ftp


 Off topic, but does anyone know a way of using Java for FTP'ing?

 Johnny


 BUY YOUR 2001 ISA AT INTERACTIVE INVESTOR'S NEW ISA CENTRE - visit
 http://www.iii.co.uk/isa for a choice of 400+ funds, market leading
 discounts
 and access to expert advice.

 FANCY A FREE ISA? Enter our competition now at http://www.iii.co.uk/isa
 Terms and Conditions apply and are available online.
 Issued by Interactive Investor Trading Limited, regulated by the SFA.





BUY YOUR 2001 ISA AT INTERACTIVE INVESTOR'S NEW ISA CENTRE - visit 
http://www.iii.co.uk/isa for a choice of 400+ funds, market leading
discounts 
and access to expert advice. 

FANCY A FREE ISA? Enter our competition now at http://www.iii.co.uk/isa 
Terms and Conditions apply and are available online. 
Issued by Interactive Investor Trading Limited, regulated by the SFA.




AW: Java ftp

2001-03-02 Thread Regele, Manfred


Multithreaded FTP-Bean (OpenSource IBM). Would not reccommend it in a
EJB-Class,
since it seems to be multithreaded.

http://www10.software.ibm.com/developerworks/opensource/cvs/ftp/

Manfred Regele 
ADIG Investment GmbH
22 MethodenTools
Richard-Reitzner-Allee 2
85540 Haar
Tel: 089/46268-308
mailto:[EMAIL PROTECTED]
http://www.adig.de

 -Ursprngliche Nachricht-
 Von:  John Miller [SMTP:[EMAIL PROTECTED]]
 Gesendet am:  Freitag, 2. Mrz 2001 10:48
 An:   Orion-Interest
 Betreff:  Java ftp
 
 Off topic, but does anyone know a way of using Java for FTP'ing?
 
 Johnny
 
 
 BUY YOUR 2001 ISA AT INTERACTIVE INVESTOR'S NEW ISA CENTRE - visit 
 http://www.iii.co.uk/isa for a choice of 400+ funds, market leading
 discounts 
 and access to expert advice. 
 
 FANCY A FREE ISA? Enter our competition now at http://www.iii.co.uk/isa 
 Terms and Conditions apply and are available online. 
 Issued by Interactive Investor Trading Limited, regulated by the SFA.




Re: ONCE AGAIN !!!! PK.class CMP beans in ORION

2001-03-02 Thread Dominic Hanlan

I don't know about the Roman book, I downloaded it but as I can't print it
and read it on the toilet so . The O'Reilly book on EJB is excellent and
covers the CMP and PK question fully. I literarily implemented my usage
straight out of the book.

Regards





Re: Capturing the output of a JSP page as HTML

2001-03-02 Thread Geoff Marshall

No problem, write a servelt or other JSP page that does a method='post' to
the JSP in question.  You will have to read the output of the page into a
variable.  Then you can write the variable to both a file and out.println.

The only catch is you will have to have a class that can do a post! See the
attatchment...
-- 

-Geoff Marshall, Director of Development

...
t e r r a s c o p e  (415) 951-4944
54 Mint Street, Suite 110 direct (415) 625-0349
San Francisco, CA  94103 fax (415) 625-0306
...

 From: [EMAIL PROTECTED]
 Reply-To: Orion-Interest [EMAIL PROTECTED]
 Date: Thu, 1 Mar 2001 11:32:25 -0500
 To: Orion-Interest [EMAIL PROTECTED]
 Subject: Capturing the output of a JSP page as HTML
 
 Can anyone tell me if this is possible.  I have a JSP page that contains
 information about an order that was just entered (Essentially a
 confirmation page).  What I want to do is somehow intercept the output
 stream inside the JSP page and write it to a file, as plain html, which I
 will later attach to an email and send to someone.
 
 Thanks,
 Andy
 
 
 



package db;

import java.io.*;
import java.net.*;
import java.util.*;

public class RequestBean
{

private String host;
private Vector args;
private String query;
private String template;
private String NEWLINE;
private String method;

public RequestBean()
{
query = "";
template = "";
NEWLINE = "\n";
method = "post";
host = "";
args = new Vector();
NEWLINE = System.getProperty("line.separator");


System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
}

public void setHost(String s)
{
host = s;
query = "";
}

public String getHost()
{
return host;
}

public void setMethod(String s)
{
method = s;
}

public String getMethod()
{
return method;
}

public void setQuery(String s)
{
query = s;
}

public String getQuery()
{
return query;
}

public void setArgs(Vector vector)
{
args = vector;
}

public Vector getArgs()
{
return args;
}

public void addPair(String s, String s1)
{
args.addElement(s);
args.addElement(s1);
}

public void setTemplate(String s)
{
template = s;
}

public String getTemplate()
{
return template;
}

public String action()
{
if(method.equalsIgnoreCase("get"))
return doGet();
else
return doPost();
}

public String doPost()
{
Object obj = null;
URLConnection urlconnection = null;
String s2 = host;
String s3 = "";
if(query.length()  0)
s2 = s2 + "?" + query;
   
   // Build string of name/value pairs for post
   String s = "";
   Enumeration enumeration = args.elements();
   while(enumeration.hasMoreElements()) 
{
if(s.length()  0)
s = s + "";

s = s + (String)enumeration.nextElement() + "=";
s = s + URLEncoder.encode((String)enumeration.nextElement());
}

try
{
URL url = new URL(s2);
urlconnection = url.openConnection();
urlconnection.setDoOutput(true);
urlconnection.setDoInput(true);
urlconnection.setUseCaches(false);
urlconnection.setRequestProperty("content-type", 
"application/x-www-form-urlencoded");
PrintWriter printwriter = new PrintWriter(urlconnection.getOutputStream());
printwriter.print(s); // send post parms
printwriter.close();
}
catch(Exception _ex)
{
return "EXCEPTION 1:" + _ex;
}

try
{
BufferedReader bufferedreader = new BufferedReader(new 
InputStreamReader(urlconnection.getInputStream()));
String s1;
try
{
while((s1 = bufferedreader.readLine()) != null) 
s3 = s3 + s1 + NEWLINE;
}
catch(Exception _ex) { }
bufferedreader.close();
}
catch(Exception _ex)
{
return "EXCEPTION 2:" + _ex;
}

return s3;
}

public String doGet()
{
Object obj = null;
URLConnection urlconnection = null;
String s = "";
String s2 = host;
String s3 = "";
if(query.length()  0)
s2 = s2 + "?" + query;
try
{
URL url = new URL(s2);
urlconnection = url.openConnection();
urlconnection.setDoInput(true);

Re: need help getting started

2001-03-02 Thread Geoff Marshall

I'm using Orion for only JSP, Beans and Servlets.  It's solid, fast, and
when you're ready to move on, you don't have to move out
-- 

-Geoff Marshall, Director of Development

...
t e r r a s c o p e  (415) 951-4944
54 Mint Street, Suite 110 direct (415) 625-0349
San Francisco, CA  94103 fax (415) 625-0306
...

 From: "johnd" [EMAIL PROTECTED]
 Reply-To: Orion-Interest [EMAIL PROTECTED]
 Date: Thu, 1 Mar 2001 20:59:00 -0800
 To: Orion-Interest [EMAIL PROTECTED]
 Subject: Re: need help getting started
 
 my main reason for switching was that orion is much faster than tomcat.
 Isn't that so?
 
 But, you are right, I had the feeling that it was way over kill...I am also
 looking into resin, I guess that is over kill, too for functionality, but
 like I said I was looking for speed gains.
 
 - Original Message -
 From: "Randahl Fink Isaksen" [EMAIL PROTECTED]
 To: "Orion-Interest" [EMAIL PROTECTED]
 Sent: Thursday, March 01, 2001 2:10 PM
 Subject: RE: need help getting started
 
 
 I would definately *NOT* recommend moving away from Tomcat if you only use
 JSP and servlets. Tomcat is the reference implementation, it is free, and
 unless you need a product with a lot of additional features (GUI helper
 tools, EJBs, remote debugging, etc.) there is no reason to open up a can
 of
 worms.
 I really like the Orion server but that is for its EJB capabilities. I
 think
 the Orion team strives for making it a great EJB server. - The aim is not
 specifically to make it the best JSP/Servlet platform available, so I
 would
 not expect it to be ahead of Tomcat in that sence.
 Orion is a great product, but also a more complicated product, so if you
 can
 use a less complex system and still fulfill your needs, then I sure
 recommend you do so.
 
 However, should you get to the point where you simply don't think using
 just
 a relational database and several truck loads of SQL really makes your
 day,
 THEN JOIN THE CLUB - that is why many of use Orion Server and Enterprise
 Java Beans.
 
 Yours Sincerely
 
 Randahl
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of John de la
 Garza
 Sent: 1. marts 2001 19:01
 To: Orion-Interest
 Subject: need help getting started
 
 
 I have been using tomcat for some time now and am having issues with it...
 
 
 I am thinking about using Orion.  I don't do any ejb stuff and only need a
 servlet container and web server.
 
 I am having trouble using formbased security.  I couldn't get it to work
 with the users set up in the principals file.  When I would go to a
 protected area I would just get a message saying 'not allowed here' or
 something like that but I would not get prompted for a pw username.
 
 
 I actually don't want to use the principals file but have the usernames
 and
 passwds in a data base.
 
 Can anyone here refer me to some documentation on this?
 
 
 
 
 
 





Re: Storing HttpServletRequest Object in Session

2001-03-02 Thread Geoff Marshall

Because when you retrieve the request, the request is over.  The object is
gone.

Set those values at the session level.
-- 

-Geoff Marshall, Director of Development

...
t e r r a s c o p e  (415) 951-4944
54 Mint Street, Suite 110 direct (415) 625-0349
San Francisco, CA  94103 fax (415) 625-0306
...

 From: "Santosh Kumar" [EMAIL PROTECTED]
 Reply-To: Orion-Interest [EMAIL PROTECTED]
 Date: Fri, 2 Mar 2001 14:06:46 +0530
 To: Orion-Interest [EMAIL PROTECTED]
 Subject: Storing HttpServletRequest Object in Session
 
 Hi all,
 I tried to store the implicit request object in session. But when i tried to
 retrieve it.
 
 
 one.jsp
 --
 
 ...
 ...
 
 request.setAttribute("ONE", "1");
 request.setAttribute("TWO", "2");
 ..
 ..
 session.setAttribute("request",request);
 ..
 -- forward to two.jsp
 
 
 two.jsp
 --
 request = (HttpServletRequest)  session.getAttribute("request");
 out.println((String) request.getAttribute("ONE"));
 out.println((String) request.getAttribute("TWO"));
 
 
 Both the print statements are returning null.. i was expecting 1 and 2
 WHY
 
 
 Regards,
 Santosh
 
 
 
 
 
 





ResultSet chaching

2001-03-02 Thread Luis Javier Beltran



Hi,

Does Orion do resultset caching? because althought 
the database data has changed it still shows me the same data it showed before 
adding information to the db...

If it does, how can I disable it?

thanks a lot!

Luis Javier


Re: Capturing the output of a JSP page as HTML

2001-03-02 Thread Boris Erukhimov


We had a similar task that Andy described  and solved it in almost exactly a
way Geoff suggested.
But if I were to approach it now, I'd rather use filter and owerwrite response
object.
That saves extra HTTP connection within request processing and looks more
elegant anyway.

~boris

Geoff Marshall wrote:

 No problem, write a servelt or other JSP page that does a method='post' to
 the JSP in question.  You will have to read the output of the page into a
 variable.  Then you can write the variable to both a file and out.println.

 The only catch is you will have to have a class that can do a post! See the
 attatchment...
 --

 -Geoff Marshall, Director of Development

 ...
 t e r r a s c o p e  (415) 951-4944
 54 Mint Street, Suite 110 direct (415) 625-0349
 San Francisco, CA  94103 fax (415) 625-0306
 ...

  From: [EMAIL PROTECTED]
  Reply-To: Orion-Interest [EMAIL PROTECTED]
  Date: Thu, 1 Mar 2001 11:32:25 -0500
  To: Orion-Interest [EMAIL PROTECTED]
  Subject: Capturing the output of a JSP page as HTML
 
  Can anyone tell me if this is possible.  I have a JSP page that contains
  information about an order that was just entered (Essentially a
  confirmation page).  What I want to do is somehow intercept the output
  stream inside the JSP page and write it to a file, as plain html, which I
  will later attach to an email and send to someone.
 
  Thanks,
  Andy
 
 
 

   
Name: RequestBean.java
RequestBean.javaType: Plain Text (text/plain)
Encoding: base64





RE: EJBQL

2001-03-02 Thread Edoardo Comar

 -Original Message-
 that may have changed recently. Not sure that I know of any app 
 server that is fully EJB2.0
 compliant as yet...

have a look at what's happening here ...

http://theserverside.com/home/thread.jsp?thread_id=4658






Is there an Orion Newsgroup?

2001-03-02 Thread Matt O'Donnell

The emails are great but a little difficult to manage and search through.

== http://www.compoze.com =
 Matt O'Donnell
 Compoze Software, Inc.
 953 Mission St.
 Suite 150
 San Francisco, CA 94103
 
 Internet: [EMAIL PROTECTED]
 Office: 415.247.9797
 Fax: 415.247.0208
 Mobile: 415.860.6343
 PA Office: 610.862.1104
== http://www.compoze.com =





Re: AW: Java ftp

2001-03-02 Thread Tim Endres

There is also a nice FTP package at:

   http://www.gjt.org/servlets/JCVSlet/list/gjt/com/fooware/net

tim.

 Multithreaded FTP-Bean (OpenSource IBM). Would not reccommend it in a
 EJB-Class,
 since it seems to be multithreaded.
 
 http://www10.software.ibm.com/developerworks/opensource/cvs/ftp/
 
 Manfred Regele 
 ADIG Investment GmbH
 22 MethodenTools
 Richard-Reitzner-Allee 2
 85540 Haar
 Tel: 089/46268-308
 mailto:[EMAIL PROTECTED]
 http://www.adig.de
 
  -Ursprüngliche Nachricht-
  Von:John Miller [SMTP:[EMAIL PROTECTED]]
  Gesendet am:Freitag, 2. März 2001 10:48
  An: Orion-Interest
  Betreff:Java ftp
  
  Off topic, but does anyone know a way of using Java for FTP'ing?
  
  Johnny
  
  
  BUY YOUR 2001 ISA AT INTERACTIVE INVESTOR'S NEW ISA CENTRE - visit 
  http://www.iii.co.uk/isa for a choice of 400+ funds, market leading
  discounts 
  and access to expert advice. 
  
  FANCY A FREE ISA? Enter our competition now at http://www.iii.co.uk/isa 
  Terms and Conditions apply and are available online. 
  Issued by Interactive Investor Trading Limited, regulated by the SFA.
 





Re: EJBQL

2001-03-02 Thread denis despinoy

After testing against the ejb2.0 spec It appears Orion
and Weblogic are the only two considered EJB2.0
compliant so far.

What are looking after in the ejb2.0 spec ?

DD


--- Ray Harrison [EMAIL PROTECTED] wrote:
 The latest information in hand that I know of is
 that no - they do not support EJBQL - although
 that may have changed recently. Not sure that I know
 of any app server that is fully EJB2.0
 compliant as yet...
 
 Cheers
 RHH
 --- fresnaULL [EMAIL PROTECTED] wrote:
  Does Orion provide support for EJBQL? Which Orion
 version?
  Is Orion full EJB 2.0 compliant?
  
  Thanks in advance
  
 
 
 __
 Do You Yahoo!?
 Get email at your own domain with Yahoo! Mail. 
 http://personal.mail.yahoo.com/
 


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




RE: EJBQL

2001-03-02 Thread Ray Harrison

Very interesting discussion. Definitely worth a look.


--- Edoardo Comar [EMAIL PROTECTED] wrote:
  -Original Message-
  that may have changed recently. Not sure that I know of any app 
  server that is fully EJB2.0
  compliant as yet...
 
 have a look at what's happening here ...
 
 http://theserverside.com/home/thread.jsp?thread_id=4658
 
 
 


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




Re: AW: Java ftp

2001-03-02 Thread David Morton

http://www.savarese.org/oro/products/NetComponents.html

At 01:08 PM 3/2/01 -0500, you wrote:
There is also a nice FTP package at:

http://www.gjt.org/servlets/JCVSlet/list/gjt/com/fooware/net

tim.

  Multithreaded FTP-Bean (OpenSource IBM). Would not reccommend it in a
  EJB-Class,
  since it seems to be multithreaded.
 
  http://www10.software.ibm.com/developerworks/opensource/cvs/ftp/
 
  Manfred Regele
  ADIG Investment GmbH
  22 MethodenTools
  Richard-Reitzner-Allee 2
  85540 Haar
  Tel: 089/46268-308
  mailto:[EMAIL PROTECTED]
  http://www.adig.de
 
   -Ursprngliche Nachricht-
   Von:John Miller [SMTP:[EMAIL PROTECTED]]
   Gesendet am:Freitag, 2. Mrz 2001 10:48
   An: Orion-Interest
   Betreff:Java ftp
  
   Off topic, but does anyone know a way of using Java for FTP'ing?
  
   Johnny
  
  
   BUY YOUR 2001 ISA AT INTERACTIVE INVESTOR'S NEW ISA CENTRE - visit
   http://www.iii.co.uk/isa for a choice of 400+ funds, market leading
   discounts
   and access to expert advice.
  
   FANCY A FREE ISA? Enter our competition now at http://www.iii.co.uk/isa
   Terms and Conditions apply and are available online.
   Issued by Interactive Investor Trading Limited, regulated by the SFA.
 






Re: Storing HttpServletRequest Object in Session

2001-03-02 Thread Jeff Hubbach

Why are you trying to put the request into the session? If you're doing
a jsp:forward to two.jsp, then you can still see your request. The
following works...

one.jsp
...
request.setAttribute("ONE","1");
request.setAttribute("TWO","2");
jsp:forward page="two.jsp" /


two.jsp
...
One is %=request.getAttribute("ONE") %
Two is %=request.getAttribute("TWO") %
...

This makes sense because a forward is all in the same request.

Jeff Hubbach





Default datasource.

2001-03-02 Thread James Hill


Is there a j2ee standard way to get the default datasource (that your CMP
beans would be using) from a servlet or a session bean?


Thanks,
James





Finding my images

2001-03-02 Thread Paul G. Markovich

Hi,

I have set up a web.xml file in the
default-web-app directory, it reads
as follows:
web-app
servlet
servlet-nameMyApp/servlet-name
servlet-classcom.testing.test/servlet-class
load-on-startup1/load-on-startup
  servlet-mapping
servlet-nameMyApp/servlet-name
   url-pattern*.tnt/url-pattern
  /servlet-mapping
/web-app

I have images that don't show up in the 
servlet and I believe I don't have the
image directory in the right location

If I access the servlet like this
http://localhost/MyApp/GetListing.tnt

When the page is served, my images don't
show up, and they show the following path
http://localhost/MyApp/myimage.gif

Q1) Where should the images be placed to be
found.

Q2) Do I need to do an image mapping someplace??

thanks,

Paul




RE: Orion Tutorial, Parts 1 and 2

2001-03-02 Thread Kemp Randy-W18971

 That's a wonderful offer and would group all the tutorials together under one web 
site -- you both have created very excellent tutorials. 

-Original Message-
From: Ernst de Haan
To: Orion-Interest
Sent: 3/1/01 7:30 PM
Subject: Re: Orion Tutorial, Parts 1 and 2

Although I've written my own Orion tutorials for starters, I heartily
welcome
your contributions! If you like I can give you my XML tutorial format
plus an
XSLT stylesheet that will convert it to a format similar to the Orion
Primer:

   * http://jollem.com/orion-primer/

Ofcourse I'd welcome new stylesheets as well, I already `uniquely'
identified
my stylesheet as `Classic' ;)

I'd also be happy to host your tutorials at http://jollem.com/. In that
case
you can have a shell account and CVS access (to the other Orion
tutorials
too).

If you want www.orionsupport.com to host your tutorials, they probably
have
their own XML format for documents posted there.

Thanks again for your contribution!

--
Ernst


James Halloran wrote:
 Hello Orion community,
 
 I cleaned up the tutorial I posted here a few days ago, and I added a
Part 2 
 that explains connecting to Oracle.  The only tools you need to use
are 
 javac, jar, and deploytool.  You won't need to write any XML files
either, 
 aside from adding lines the Orion config files.  I hope these guides
will be 
 useful for newcomers to Orion, or even J2EE.
 
 http://www.4degreez.com/intro_part_1.html
 http://www.4degreez.com/intro_part_2.html
 
 I think everything will work properly, but it's possible that there is
a 
 mistake or two in there so let me know if you find any.  If someone is
able 
 to follow through it and get it to work, I'd love to hear about it.
 
 In a few days, I'll see about getting it posted at orionsupport.
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com
 
 
 




webwork/cookie issue

2001-03-02 Thread Stan Ng

I ran into an interesting bug with regards to WebWork... thanks for Jeff for
sorting it out.  I just wanted to see if anyone here had any advice on
working around this bug?



Forwarded from webwork mailing list:


- Original Message -
From: "Jeff Schnitzer" [EMAIL PROTECTED]
To: "Stan Ng" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, March 02, 2001 6:04 PM
Subject: RE: [Webwork-user] Test.action error


This happens consistently when you have cookies disabled and the
appserver tries to rewrite the url.

There seems to be a minor bug in Orion in that the first time you visit
a page after the server is reloaded, Orion fails to set cookies and
falls back to url rewriting.  When you reload the page or visit it
subsequently in the future, Orion seems to be ok with cookies.

But when cookies are disabled, Orion can't handle webwork:includes,
because WebWork is calling encodeURL() on the URL to include.  The
exception is thrown from
com.evermind.server.http.EvermindPageContext.include().  I was planning
on mentioning this to the list but I've been busy with other subjects
:-)

To encode or not encode pageContext.include()s.  I didn't see anything
in the JSP spec which implies one way or the other.  Wierd.

Jeff


-Original Message-
From: Stan Ng [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 02, 2001 2:02 PM
To: [EMAIL PROTECTED]
Subject: [Webwork-user] Test.action error


I just downloaded WebWork 0.91 and it seems excellent!  Quick question
-- is there a bug with Test.action?  I keep getting the following error
the first time I hit the page.

500 Internal Server Error
java.lang.IllegalArgumentException: Resource
/ServletTest.action;jsessionid=SOMEID not found
...

As far as I can tell, this happens when the request.jsp is included by
the test results after a new session cookie is created.  Is this
exception happening because it is trying to read by a cookie that isn't
received by the user agent yet?  Or do I have something configured
incorrectly?

For the record, the appserver is Orion 1.4.7 on Win2k and the browsers I
tried were Netscape 4.7.5  IE 5.5.





Re: Default datasource.

2001-03-02 Thread Jay Armstrong

James,

J2EE EJB containers are not required to implement persistence mechanisms in
any particular way.  Because the interface between J2EE servers and EJB
containers is left up to the server vendors, I do not believe that there is
any "standard" way to communicate with a container to determine what, if
any, datasources have been configured.  

If no datasources have been configured, then there will likely be some kind
of EJB deployment error when Orion (or presumably other EJB servers) start
up.  For example, if you set up Orion to run the Cart demo, but do not
configure any data source, it will probably complain.  

Though some container vendors may provide methods to communicate with their
servers and containers, I do not believe the spec requires that they do so.

The only possible way I can think of to do this would be to do a JNDI
lookup of the name of the default database.  In datasources.xml there is
are "location", "ejb-location", "xa-location" and "pooled-location"
parameters that are defined in orion/docs/data-sources.xml.html:

"location - The JNDI-path to bind this DataSource to."

"ejb-location - The JNDI-path to bind an EJB-aware and pooled version of
this DataSource to. (only applies to ConnectionDataSources). This version
of the datasoruce will automatically take part in container-managed
transactions and is the type of source that should be used from within EJBs
and similar (if you use a "clean" datasource you loose the
container-managed transactions support)."

Here's an example data-source.xml file provided by Orion:
data-sources

data-source 

name="Default data-source"
class="com.evermind.sql.ConnectionDataSource"
location="jdbc/DefaultDS"
pooled-location="jdbc/DefaultPooledDS"
xa-location="jdbc/xa/DefaultXADS"
ejb-location="jdbc/DefaultEJBDS"
url="jdbc:HypersonicSQL:defaultdb"
connection-driver="hSql.hDriver"
username="xxx"
password="yyy"
schema="database-schemas/hypersonic.xml"

/
/data-sources

What this says to me, is that you should be able to look up the "location",
"ejb-location", "pooled-location", and "xa-location" in JNDI under the
"jdbc" tree.

So, I added the following code to the simple Cart EJB demo in Orion:
  Object dumObject = context.lookup( "jdbc/DefaultDS" );
  System.out.println( dumObject );
 
When I ran the Cart demo, it printed out the following:
jdbc:HypersonicSQL:hsql://localhost
Item not found in cart: Oranges

So, you can see that it found my default data source, which is the "server"
version of HypersonicSQL.

Hope this helps.  Anyone else out there?

Jay Armstrong
[EMAIL PROTECTED]

At 04:30 PM 3/2/01 -0600, you wrote:

Is there a j2ee standard way to get the default datasource (that your CMP
beans would be using) from a servlet or a session bean?


Thanks,
James








ssl and com.evermind.util.User ?

2001-03-02 Thread denis despinoy


I've installed a portion of my site under SSL. this
part works great and thanks to the info got from this
list !

I'm now trying to get the
/demo/ssl/ssl-user-registration.jsp to run but I'm
faced with 2 prbs !

it seems I cannot locate 

1) com.evermind.util.User ! which jar file does it
live in ?

2) com.evermind.util.UserManager ! I found a
com.evermind.security.UserManager ?

Did orion refactor their code ? 

thanks

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




Re: EJBQL

2001-03-02 Thread Jim Archer

Denis, this is way overstating the "compliance" of both Orion and Weblogic. 
Both of these servers have substantial issues with adherence to the 
proposed final draft. Both lack some features and implement others 
incorrectly or incompletely.

Any examples you see that are written to demonstrate EJB 2.0 on Orion 
(particulary the ones I wrote) demonstrate not EJB 2.0 as speced in the 
PFD, but rather how to make EJB 2.0 run on Orion. Orion has big differences 
between what it does and whats written in the PFD spec.

This is not a knock on Orion. EJB 2.0 is a moving target and keeping up 
would take substantial resources maybe for very little gain. I expect when 
the actual spec comes out we will see Orion adopt it agressively, although 
I am just guessing, as I don't speak for Orion. I cdertianally hope this is 
the case, as I want to deploy my J2EE/EJB 2.0 stuff on it.

If you want to start coding for EJB 2.0 now then there are two options that 
adhere ridgely to the PFD. First, is the reference implementation of J2EE 
beta recently released by Sun and available from them. Next is the MVC Soft 
persistence manager, available at:

http://www.mvcsoft.com

Be warned! The final spec may change and you may have to change your code.

Have fun and good luck!

Jim

--On Friday, March 02, 2001 10:49 AM -0800 denis despinoy 
[EMAIL PROTECTED] wrote:

 After testing against the ejb2.0 spec It appears Orion
 and Weblogic are the only two considered EJB2.0
 compliant so far.

 What are looking after in the ejb2.0 spec ?

 DD


 --- Ray Harrison [EMAIL PROTECTED] wrote:
 The latest information in hand that I know of is
 that no - they do not support EJBQL - although
 that may have changed recently. Not sure that I know
 of any app server that is fully EJB2.0
 compliant as yet...

 Cheers
 RHH
 --- fresnaULL [EMAIL PROTECTED] wrote:
  Does Orion provide support for EJBQL? Which Orion
 version?
  Is Orion full EJB 2.0 compliant?
 
  Thanks in advance
 


 __
 Do You Yahoo!?
 Get email at your own domain with Yahoo! Mail.
 http://personal.mail.yahoo.com/



 __
 Do You Yahoo!?
 Get email at your own domain with Yahoo! Mail.
 http://personal.mail.yahoo.com/




I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I -
I took the one less traveled by,
And that has made all the difference.

- Robert Frost, 1916