RE: Does Orion root .jar files interfere with my web-appWEB-INF/libjar files?
So is there an easy way to reverse or specify the order? xerces et.al. have a different release schedule and may or may not be picked up by Orion. I would rather it be under my control. - Kit -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Hani Suleiman Sent: Sunday, July 15, 2001 2:39 AM To: Orion-Interest Subject: Re: Does Orion root .jar files interfere with my web-app WEB-INF/libjar files? Order of loading is: Entries explicitly in the root classloader (specified by Class-Path in orion.jar's MANIFEST.MF), which is most of what is in the orion/ directory. Next is orion/lib Next is application specific classes, and I think WEB-INF/lib has precedence over WEB-INF/classes Hani On Sun, 15 Jul 2001, Kevin Duffey wrote: Hey all, I am wondering..Orion comes with xerces, parser, jaxp and so on in the root dir. If I put the latest xerces (1.4.1) into my web-inf/lib dir, put the soap.jar in there, put parser.jar in there, jaxp.jar, etc..will Orion load my web-inf/lib versions, the root-dir versions, or both..and in what order? Should I remove the xerces.jar from orion root, or copy the latest over the top of the root dir version? Probably stupid questions, but I have read alot on the soap list about people using the wrong version of the xerces.jar, putting it in a certain order in the classpath, etc. I'd like to make sure I am aware of how the .jar files in Orion interfere or load in what order compared to anything duplicated in any web application or enterprise application. Thanks.
2 parameter finder finding wrong thing
I am using EJB 2.0 and have a finder method that takes 2 parameters (e.g. the WHERE clause looks something like WHERE columnOne = ?1 AND columnTwo = ?2). No matter what I do, it does not return the right entity. I have tried single-object return, Collection return, narrowing, not narrowing, checking parameters, etc. I am running Orion 1.4.7 on HypersonicSQL for my testbed. Any ideas? Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com
ejb-jar.xml -- orion-ejb-jar.xml bug? finder parameters
I have discovered that when creating a finder with 2 parameters, the resulting orion-ejb-jar.xml that gets generated by Orion outputs finder-method query= instead of finder-method query=$columnOne = $1 AND $columnTwo = $2 for the finder example below. Single-parameter finders seem to generate the correct query. Has anyone experienced this problem? Is there a work-around or should I report this as an enhancement request or bug? Please don't tell me I have to edit this file by hand or some sort of processing during a build! - Kit -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Kit Cragin Sent: Sunday, July 08, 2001 12:30 PM To: Orion-Interest Subject: 2 parameter finder finding wrong thing I am using EJB 2.0 and have a finder method that takes 2 parameters (e.g. the WHERE clause looks something like WHERE columnOne = ?1 AND columnTwo = ?2). No matter what I do, it does not return the right entity. I have tried single-object return, Collection return, narrowing, not narrowing, checking parameters, etc. I am running Orion 1.4.7 on HypersonicSQL for my testbed. Any ideas? Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com
Orion/EJBGen/EJB 2.0/Hypersonic finder method problem...
Hi all, I am using Orion 1.4.7 (and other versions), EJBGen 1.19, EJB 2.0 and HypersonicSQL (last version). The problem I am having is with all my finder methods that return a single bean instead of a Collection. I can't get the single bean finders to work no matter what I try. The spec says you can do this, and of course there should be a reasonable expectation that you can generate a query that results in a single object, even if you use an object ID as the primary key which I do. I have an entity bean, with a long as the primary key, and a string, say Name, as the second column. When I create my finder, the where clause is WHERE Name = ?1 and the return type is the bean. Nothing weird there. No matter what I do, the finder returns the first entity bean in the table, even though the names DO NOT MATCH. The only way I have gotten this to work is to have the finder return a Collection and then iterate the collection. Now this collection is of size one, but I shouldn't have to do this. Any ideas? Thanks, Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com
1.5.1 vs 1.4.7 RequestDispatcher
Is there something that changed between 1.5.1 and 1.4.7 that broke my forward() requests? I have a servlet mapped to /start and protected by a role, user, in web.xml. The servlet obtains a RequestDispatcher to /roles/user/index.jsp. This JSP has an iframe that loads /roles/user/content.html. Under 1.4.7 when I do http://localhost/webapp/start I got a login prompt as expected and everything shows up correctly. Under 1.5.1, the same URL causes 3 login prompts. On the last one, I get a 401 unauthorized on content.html. Anyone know why this could be occuring? Thanks, Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com
getProperty toString
Hi: I am trying to access a bean from my JSP code. The property on the bean is an object. I thought, reading from the spec, that the toString() method would be called on the object I am trying to access. For instance if I had: jsp:useBean id="book" class="Book" scope="session" / ... jsp:getProperty name="book" property="author" / would print out the author's name if I had the following classes: public class Book { public Author getAuthor() { return author; } private Author author; } public class Author { public getName() { return name; } public toString() { return name; } private String name; } The spec says "The conversion to String is done as in the println() methods, i.e. the toString() method of the object is used for Object instances, and the primitive types are converted directly," in section 2.13.3, but this does not seem to be the case. If anyone has any ideas, let me know. Thanks. Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com
RE: tag library problem with attributes
Title: RE: tag library problem with attributes Thanks! Amazing how you can stare at code for hours and then someone comes along and notices the problem immediately! - Kit -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Magnus RydinSent: Thursday, October 12, 2000 1:25 AMTo: Orion-InterestSubject: RE: tag library problem with attributes Kit, should that be %=library.getBooks()% (notice the equals sign missing in your code)
SSL question
Hi all I have a problem using the command below. keytool -keystore keystore -keyalg "RSA" -import -trustcacerts -file my.host.com.cer I get this error: keytool error: Failed to establish chain from reply But, this command worked fine keytool -import -trustcacerts -file my.host.com.cer Is there any problem using the second command, since it's missing some arguments as indicated in the ssl-how-to documentation. Thanks -kit
tag library problem with attributes
Hi: I am getting the error message "Attribute of type 'java.util.Collection' must be a request time attribute" when Orion attempts to parse my JSP. This seems weird because I do set rtexprvalue to true in my taglib.tld (see below). I was attempting to create an iterator similar to the one defined in the orion taglib tutorial at http://www.orionserver.com/taglibtut/index.jsp and include it in my web application. My JSP contains: %@ taglib uri="tags" prefix="model" % jsp:useBean id="library" type="com.mongoosetech.model.Library" scope="application"/ ... model:iterator name="book" type="com.mongoosetech.model.Book" collection="% library.getBooks() %" jsp:getProperty name="book" property="name"/br/ /model:iterator where library.getBooks() returns a java.util.Collection of Book. I have 2 classes: public class NestedTagInfo extends TagExtraInfo { public VariableInfo[] getVariableInfo(TagData data) { return new VariableInfo[] { new VariableInfo(data.getAttributeString("name"), data.getAttributeString("type"), true, VariableInfo.NESTED) }; } } and public class IteratorTag extends BodyTagSupport { public int doStartTag() { if (iterator == null || !iterator.hasNext()) return SKIP_BODY; pageContext.setAttribute(name, iterator.next(), PageContext.PAGE_SCOPE); return EVAL_BODY_TAG; } public int doAfterBody() throws JspException { if( !iterator.hasNext()) return SKIP_BODY; pageContext.setAttribute(name, iterator.next(), PageContext.PAGE_SCOPE); return EVAL_BODY_TAG; } public int doEndTag() throws JspException { try { if(bodyContent != null) bodyContent.writeOut(bodyContent.getEnclosingWriter()); } catch(java.io.IOException e) { throw new JspException(e.getMessage()); } return EVAL_PAGE; } public void setName(String name) { this.name = name; } public void setCollection(Collection collection) { if (collection.size() 0) iterator = collection.iterator(); } public void setType(String type) { this.type = type; } private String name; private String type; private Iterator iterator; } defined in the com.mongoosetech.tags package and a taglib.tld that looks like: taglib ... tag nameiterator/name tagclasscom.mongoosetech.tags.IteratorTag/tagclass teiclasscom.mongoosetech.tags.IteratorTagInfo/teiclass bodycontentJSP/bodycontent attribute namename/name requiredtrue/required /attribute attribute nametype/name requiredfalse/required /attribute attribute namecollection/name requiredtrue/required rtexprvaluetrue/rtexprvalue /attribute /tag /taglib and is a part of WEB-INF/lib/tags.jar which has the structure: com/mongoosetech/tags/IteratorTag.class com/mongoosetech/tags/IteratorTagInfo.class META-INF/taglib.tld Finally, I have a web.xml with an entry to point to the tag library: taglib taglib-uritags/taglib-uri taglib-location/WEB-INF/lib/tags.jar/taglib-location /taglib Anyone have any ideas why this is happening? Thanks... Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com
what are the rules for urls in a web-app?
Has anyone figured out the rules for URLs wrt relative path names in Orion? They seem different in the following conditions: * url in html page directly * url in jsp * url in html page forwarded to by a servlet * url in jsp forwarded to by a servlet * url in html page redirected to by a servlet * url in jsp redirected to by a servlet I have tried the following, and can usually get something working in most cases, but not consistently: * url with relative path several different ways: ./path path ../path etc * url rooted with / (excluding the root as specified in default website) * url rooted with / (includeing root as specified in default website) * fully qualified And it gets more complicated with servlet mappings... Anyone? Thanks, Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com
(try 2) Programmatic remote shutdown/start/restart of a web-app orion server
Hi: I know that I can use "java -jar admin.jar etc" from the commandline on host 1 to stop and restart Orion on host 2. This, however, requires admin.jar (and others?) on host 1. Can someone tell me if there is a programmatic method, that does not require any installation of Orion on host 1 for any of the following, and if there is, how to do it for each case? 1. from host 1, shutdown a web-application running on host 2 2. from host 1, start a web-application running on host 2 3. from host 1, restart a web-application running on host 2 4. from host 1, shutdown Orion on host 2 5. from host 1, restart Orion on host 2 Again, I'm looking for a *programmatic* way to do this. If this means admin.jar on host 1, where's the API docs for making calls of this guy without having to resort to the commandline? Right now, we're resorting to doing these things by using the commandline, manually, and writing code to remove web-apps out of the application.xml and default-web-site.xml files. This doesn't seem like a great solution... Thanks, Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com
EJB question
Hi all I am trying to build a servlet client to look up an ejb. But, i got the following error. 500 Internal Server Error java.lang.ClassCastException: CartHome_StatefulSessionHomeWrapper1 at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java, Compiled Code) at testCart.doGet(testCart.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code) at com.evermind.server.http.du.rr(JAX, Compiled Code) at com.evermind.server.http.du.forward(JAX, Compiled Code) at com.evermind.server.http.d5.rx(JAX, Compiled Code) at com.evermind.server.http.d5.rw(JAX) at com.evermind.util.f.run(JAX, Compiled Code) this is what i did to do the look up. final Properties properties = new Properties(); properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.ApplicationClientInitialContextFactory"); properties.setProperty(Context.PROVIDER_URL,"ormi://localhost/ejbsamples"); properties.setProperty(Context.SECURITY_PRINCIPAL,"username"); properties.setProperty(Context.SECURITY_CREDENTIALS, "password"); Context context = new InitialContext(properties); Object homeObject = context.lookup("MyCart"); CartHome home = (CartHome)PortableRemoteObject.narrow(homeObject,CartHome.class); Cart cart = (Cart)PortableRemoteObject.narrow(home.create(), Cart.class); Can anyone tell me why it failed ? Thanks a lot. -kit
Remote start/stop/restart of web-app server
Forgive me if this was already asked, but it seems like my last post did not make it to the mailing list. Anyway, from host 1 that has no Orion installed on it, is there a way to 1. start a web-application (make it available for requests) 2. stop a web-application 3. restart a web-application 4. stop the server 5. restart the server on host 2? From what I can tell, it seems like the only way to do #4 #5 is by installing admin.jar on host 1 and calling it by commandline "java -jar admin.jar options". I see no way for #1 - #3. I can do #1 - #3 locally by modifying the XML config files, but, again, I need to do it from remote. Thanks, Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com
Programmatic remote shutdown/start/restart of a web-application orion server
Hi: I know that I can use "java -jar admin.jar etc" from the commandline on my local machine to stop and restart a remote Orion server. This, however, requires admin.jar (and others?) on my local machine. Can someone tell me if there is a programmatic method, that does not require any installation of Orion on my local machine for any of the following, and if there is, how to do it for each case? 1. shutdown a web-application running on a remote Orion server 2. start a web-application running on a remote Orion server 3. restart a web-application running on a remote Orion server 4. shutdown a remote Orion server 5. restart a remote Orion server Again, I'm looking for a *programmatic* way to do this. If this means admin.jar on the local machine, where's the API docs for making calls of this guy without having to resort to the commandline? Thanks, Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com
Minimal configuration for web app deployment...
What is the absolute minimum that I have to do to deploy a web application (.war) file in Orion? Right now I am editing application.xml by adding a line like: web-module id="test-web" path="../../../dev/deploy/test.war"/ and editing default-website.xml by adding a line like: web-app application="default" name="test-web" root="/test" / Ideally I would like to be able to just put a .war file somewhere that Orion expects to see such things and away we go. Did I miss anything like that? Thanks, Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com
RE: webapp design: how to handle connection pooling
This is VERY slow, and in some tests its 100's of times slower than implementing a connection pool. For the original sender (and Conrad if you are not aware of this), there are two methods I would choose over the others above. The first is connection pooling. Servlets in the same web app maintain a Servlet Context that is a good place to store "global" objects. This way seems like a good idea because it should be portable across J2EE compliant application servers right? Option 2 is better when you are dealing with application servers, especialy with Orion. Orion has a very easy built-in connection pooling capability. When you suggest this method, I assume you are talking about an Orion specific mechanism correct? This is convenient if Orion is the only server you're using. If you ever want to migrate your app to a new server, you have to use that server's method or resort to the custom connection pool class above. Have I grasped the situation, or is there a J2EE-based "standard" mechanism for connection pooling that is portable across application servers? Thanks, Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com
RE: Servlet handling both *.html and /
Did you try a servlet mapping with a '/' url pattern? According to the servlet spec that makes your servlet the default servlet of the web app. Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Joel Shellman Sent: Friday, July 07, 2000 3:26 PM To: Orion-Interest Subject: Servlet handling both *.html and / I have a servlet that I want to handle all the URLs. It acts as a super servlet and allows us to parse the URLs we receive and act accordingly. Right now I have it set up to handle .html. However, when someone makes a request to a directory such as: http://www.domain.com/whatever/ the servlet is not hit--it says it can't find it. How can I make it handle these URLs as well? I know I could add a dummy file: [docroot]/whatever/index.html and then it would handle it, but I have lots of directories (and they keep being added) so that is not possible. I'm doing that right now to get around it for the root URI, but it's just a hack till I find a better solution. I can't just have the servlet handle everything as I'd like for images and style sheets and other such files to be served by orion without having to go through my super servlet. Any ideas? Thanks, -- Joel Shellman Chief Software Architect The virally-driven B2B marketplace for outsourcing projects http://www.ants.com/90589781
RE: Tools.jar doesn't works in lib statement
I have a similar problem. I tried an additional library tag instead of the ';' separated list but it didn't work. I also tried a relative path name separated by a ';' (you might try that). Otherwise copying it to the orion dir works. Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of hanasakiSent: Thursday, July 06, 2000 9:54 PMTo: Orion-InterestSubject: Tools.jar doesn't works in lib statementIt works fine for jsp's in the orion directory but doesn't work when I do: application.xml: library path="../lib;c:\jdk1.3\lib\tools.jar" / Did I put it in the correct file? Correct Syntax?
RE: Taking actions after form-based authentication?
There's no non-proprietary way of doing this that I know of right now. I think someone showed me a way to do this in Orion, but I can't seem to remember at the moment. If you get the answer let me know. I have received a response from the servlet 2.3 spec team, and they say that this feature will most likely be implemented in the 2.3 api, which will make it non-proprietary. There are members on the Orion team that are on the servlet committee as well, so that's a good sign. One portable, if inelegant solution, you can use right now is to create a base class inherited from HttpServlet that calls a function similar to the one below in the service() method. Example: public com.your.UserObject getUser(HttpServletRequest req) { HttpSession session = req.getSession(true); com.your.UserObjectuser = (com.your.UserObject)session.getAttribute("user"); if (user == null) { user = someWayOfCreatingAUser(req.getRemoteUser()); session.setAttribute("user", user); ... // do other things you need to do } return user; } Then create servlets that inherit from this class, and they all gain this ability. I don't like this solution, especially when jsp files get thrown in this mix, but I don't know of a better way right now. Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Martin Mavrov Sent: Monday, July 03, 2000 6:34 AM To: Orion-Interest Subject: Taking actions after form-based authentication? Hi, I've been wondering how can programmer take some actions (for example to put things in HttpSession) after the user had authenticated itself via form? For instance - the user tries to access some protected resource, it is presented the authentication form, it enters login/password and is forwarded to the requested resource - how can I intercept that forward action? Best regards, [EMAIL PROTECTED]
auto update - something to be aware of
Just a quick note: make sure you don't have an IDE like, say, JBuilder referencing orion.jar while running autoupdate.jar. This is probably in the docs somewhere but I thought I'd let ya know. You'll end up with a corrupt jar file. Simple solution: rerun autoupdate w/o any references. Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com
User strategies
Could anyone share their strategies for implementing their user management when deploying a web application? Specifically, I know I can use principals.xml to specify the users and roles and web.xml to apply those wrt the various servlets and web pages within the web application. However, like most websites, additional information needs to be captured for each user. I can store this in some database or whatever no problem. The question arises what is the best strategy for reconciling/merging the user information between principals.xml and the database? I'd be interested to hear your insights. Thanks, Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com
RE: admin -shutdown
We are experiencing the same problem. It may be that this is isolated ONLY to Windows based platforms as I've heard it works fine on Linux. Does anyone know of a reasonable way to affect a shutdown from within Java by locating the process ID and killing it or something like that? I know it's not likely to be cross-platform though. I think there should be a mechanism for elevating the status of problems like this to the Orion team when quite a few people are experiening it. Perhaps sending the message directly to someone on the team without cc'ing this list? Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Nathan Phelps Sent: Wednesday, June 28, 2000 10:57 AM To: Orion-Interest Subject: RE: admin -shutdown I just did, and the result is the same. Microsoft Windows 2000 [Version 5.00.2195] (c) Copyright 1985-1999 Microsoft Corp. C:\cd orion C:\orionjava -jar admin.jar ormi://localhost/ admin admin -shutdown Error: com.evermind.reflect.UndeclaredExceptionTypeException: java.lang.ClassNot FoundException C:\orion -Original Message- From: KirkYarina [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 28, 2000 10:34 AM To: Orion-Interest Subject:RE: admin -shutdown Have you tried java -jar admin.jar ormi://localhost/ admin pwd -shutdown i.e. no port. "/" after localhost? Kirk Yarina At 09:36 AM 6/28/00 -0500, you wrote: This issue is frustrating to me. You'd think something as fundamental as shutting down the server would work--it did in 0.9. I really like Orion, but I just can't recommend it to my employer if such fundamental features don't work. Ideally you won't be shutting down the server very often, however when you are configuring and testing you do it a lot. This issue has received a lot of traffic on this list, but I have yet to hear anyone for the Orion Team explain either a) what we're doing wrong to cause this error, or b) that it is indeed a bug in the software and it will be fixed in release 1.x. I understand Orion is hard to beat for the price, but I'd gladly pay more for a server I can shutdown! Nathan Phelps snip? Kirk Yarina [EMAIL PROTECTED]
RE: (loading servlet at startup) No performance using internet explorer
The following works for me: web-app servlet servlet-nameMy Servlet/servlet-name servlet-classcom.mongoosetech.servlets.MyServlet/servlet-class load-on-startup1/load-on-startup /servlet /web-app I don't know if it matters but the servlet I am loading is derived from GenericServlet not HttpServlet. Also, you might try checking the various logs. - Kit -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Patrik Andersson Sent: Wednesday, June 07, 2000 9:18 AM To: Orion-Interest Subject: No performance using internet explorer How do I have orion load a servlet on startup. I can't seem to get the load-on-startup tag work. I've tried placing it inside servlet/servlet tags and also in the servlet-mapping tag. When I place it in either of the places the site goes down. regards, patrik Andersson
changes.txt for 0.9.6
I am curious about the changes between 0.9.6 and 0.9.4, but the changes.txt is not updated... thanks, Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com
Re: session trouble still..
- Original Message - From: bradley mclain [EMAIL PROTECTED] then the jsp i redirect to executes the following: String userId = (String) session.getAttribute("userName"); would anyone be willing to describe briefly how they would pass information from a servlet to a jsp on orion via the session object? I would think that the way you did it would work too, but the way I do it is using jsp:useBean. It might make sense for you to package all your strings up into a bean and then pass that along to your jsp. In my case, I have a user object, where userid is one of the strings in the object: jsp:useBean id="user" class="my.package.UserBean" scope="session"/ html The user logged in is: jsp:getProperty name="user" property="userId"/. /html You may have to do a little rework, but I think it's a little more elegant in your jsp. Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com
security not being enforced?
Hi: I would think if, in web.xml, the url-pattern in the security-constraint and in the servlet-mapping were identical then security would be enforced. But this does not seem to be happening. For example: servlet servlet-nameTest/servlet-name servlet-classtest.test.TestServlet/servlet-class /servlet servlet-mapping servlet-nameTest/servlet-name url-pattern/test/url-pattern /servlet-mapping should be protected with a login screen if I have security-constraint web-resource-collection web-resource-nameEverthing/web-resource-name url-pattern/test/url-pattern http-method*/http-method /web-resource-collection auth-constraint role-nameusers/role-name /auth-constraint /security-constraint This does not cause the login screen to come up as expected. I tried url-pattern /* but that caused all kinds of problems. /test/* didn't work either. If I attempt to protect a JSP or HTML file - that works fine, so I know it has nothing to do with the principals.xml or roles I have setup for the web app. Any ideas? Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com
can't protect servlet in war???
Does anyone know why I can protect a .html file in my WAR but not a servlet? I have the following web.xml which correctly prevents access to all the *.html files in /home, but does not prevent access to the servlet: servlet servlet-nameTest/servlet-name servlet-classtest.TestServlet/servlet-class /servlet servlet-mapping servlet-nameTest/servlet-name url-pattern/test/url-pattern /servlet-mapping security-constraint web-resource-collection web-resource-nameMy collection/web-resource-name url-pattern/home/*/url-pattern url-pattern/test/url-pattern http-method*/http-method auth-constraint role-nameportalusers/role-name /auth-constraint /security-constraint I have tried replacing /test with test, /test/*, test/*, test/ and other variations to no effect. It seems like Orion is not following the URL pattern rules specified in the Servlet 2.2 spec, though I could be wrong. This is similar to the other problem I was having... see the other message. Any ideas? Is anyone creating web applications or is it just me? Kit Cragin VP, Product Development Mongoose Technology, Inc.
Fw: referencing resources within a web application
Anyone have this problem? - Original Message - From: Kit Cragin [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Tuesday, April 04, 2000 12:20 PM Subject: referencing resources within a web application I am not sure if the following is an Orion quirk, an oversight in the servlet 2.2 spec, or something that has just not been thought about yet... but I am having a problem with consistently referencing a resource from a .jsp within a web application via Orion. Assume I have a web-app "test" that has the following directory layout: test/ test/WEB-INF/ test/WEB-INF/web.xml test/images/ test/images/test.gif test/stuff/ test/stuff/page.jsp and that page.jsp has this html code: htmlbody !-- #1 -- img src="/images/test.gif"/br/ !-- #2 -- img src="images/test.gif"/br/ !-- #3 -- img src="/test/images/test.gif"/br/ !-- #4 -- img src="../images/test.gif"/br/ !-- #5 -- img src="http://localhost/test/images/test.gif"/ /body/html For the case in which I have test/stuff/page.jsp as a welcome-file in web.xml, img tags #2,3,5 properly display the image when browsing (i.e. http://localhost/test/) For the case in which I directly address page.jsp in the browser (i.e. http://localhost/test/stuff/page.jsp), img tags #3,4,5 work. This is inconsistent. Ideally, I would like #1 or #2 to work in both cases (in fact section 9.4 of the servlet 2.2 spec seems to indicate #1 would work). This would allow for maximum maintainability. For instance, #3 means I have to change all the references in all the JSP's should the name of the application change; #4 means I have to change all the references if I move a JSP within the application. #5, means I have to change all the references if I move application to a different server. Now, most of the time users are redirected to the .jsp files in my architecture anyway, so method #2 is fine. But I still regard this as inadequate since that may not always be the case. Is there something I missed? Any ideas? thanks, Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com
lack of response
Anyone know why the Orion team does not want to sell their product? It seems crazy to me that one of the few app servers that supports the latest specs to a high degree doesn't respond to any messages. I was initially very impressed with the product, but support is less than zero except for the few kind people who helped me out in this forum. Admittedly, we haven't purchased anything yet - but are 120% in need of something like Orion. A few simple responses would go a long way. Anybody know of a good app server that supports the latest standards like JMS 1.0, servlet 2.2, etc.? I would greatly appreciate it. Kit Cragin VP of Product Development Mongoose Technology, Inc. www.mongoosetech.com
Contact information
I would like to request the contact information for Orion beyond the [EMAIL PROTECTED] email address. Does anyone have this information? We have evaluated the server, like what we see, but have more questions before we can use it as a solution internally or externally. We are interested in hearing more, but it has been difficult to contact anyone. Thank you, Kit Cragin VP of Product Development Mongoose Technology, Inc. 281-461-0099
specifying security constraints
I am trying to specify security constraints for my web app and am running into some difficulty. In the web.xml file below for twa.war (twa = test web application), what is the correct url-pattern element of the security-constraint element that will cause /login/login.jsp to be invoked when the user attempts to access the "mytwa" servlet? i.e. http://localhost/twa/mytwa should invoke http://localhost/twa/login/login.jsp and then upon successful login redirect the user to that servlet. /*, * cause a 500 error, /mytwa, /mytwa/* pass the user straight to it. I thought (checking with the 2.2 spec) that /mytwa/* was correct, but I guess not. thanks, Kit -- ?xml version="1.0"? !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd" web-app servlet servlet-namemytwa/servlet-name servlet-classtwa.TestWebApp/servlet-class /servlet servlet-mapping servlet-namemytwa/servlet-name url-pattern/mytwa/*/url-pattern /servlet-mapping welcome-file-list welcome-file/login/login.jsp/welcome-file /welcome-file-list security-constraint web-resource-collection web-resource-nameEvery JSP Except Login Stuff/web-resource-name url-pattern/*.jsp/url-pattern !-- WHAT SHOULD THE LINE BELOW BE? -- url-pattern/mytwa/*/url-pattern http-method*/http-method /web-resource-collection auth-constraint role-nametwausers/role-name /auth-constraint /security-constraint security-role role-nametwausers/role-name descriptionUsers of the TWA/description /security-role login-config auth-methodFORM/auth-method form-login-config form-login-page/login/login.jsp/form-login-page form-error-page/login/loginretry.jsp/form-error-page /form-login-config /login-config /web-app
j_security_check
In the servlet 2.2 spec it states '...the action of the login form must always be "j_security_check"'. I noticed all the form based login examples that come with Orion do NOT have that as the action; instead action is not specified at all. It works fine w/o specifying j_security_check. I don't really care, but it seems to be incorrect with regard to the spec. and I don't want to have to change this code later. Is this a bug? - Kit
Re: Dynamic class loading in servlet
I have gotten both of these techniques to work. Thanks for your responses. I second getting the ClassLoader issues straightened out - that seems to plague alot of servlet engines/containers and j2ee servers. - Kit - Original Message - From: Ted Neward [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Thursday, March 16, 2000 11:20 PM Subject: Re: Dynamic class loading in servlet If you don't want to use Beans, you can always go with Class.forName("package.class", true, this.getClass().getClassLoader()) However, if you're loaded under the Extension ClassLoader, problems arise with this; I wrote a paper on this and how to get around it: http://www.javageeks.com/Papers/ClassForName Orion team: Make sure you get this ClassLoader thing right--BEA/WebLogic doesn't, I know for a fact. Ted Neward Java Instructor, DevelopMentor ( http://www.develop.com ) http://www.javageeks.com/~tneward -Original Message- From: Eric Richardson [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Date: Monday, March 06, 2000 8:12 AM Subject: Re: Dynamic class loading in servlet Hi, Did you try Beans.instantiate(this.getClass().getClassLoader(), "my.package.Classname") ? This would use the same classloader as servlet was loaded in assuming "this" is the servlet? We had to do this going from JRun to Orion and this is a much better way for Servlet 2.2 API. Eric :-) Kit Cragin wrote: Does anyone know how to load a class at runtime from a servlet within the Orion environment? I was able to do it using JRun 2.3.3 by getting the servlet's class loader and instantiating a class based on its name. This does not seem to work under Orion: I get a ClassNotFoundException. Thanks, Kit
bug/feature? deploying servlet (name conflict)
I have a servlet defined in a package and I tried deploy it by adding the following entry to orion/default-web-app/WEB-INF/web.xml: servlet servlet-nameruntest/servlet-name servlet-classtest.mytest.TestServlet/servlet-class /servlet and then copying the package structure to orion/servlets, creating for example this directory hierarchy: orion/servlets orion/servlets/test orion/servlets/test/mytest orion/servlets/test/mytest/TestServlet.class I also had a directory named "mytest" in the orion/default-web-app directory. This directory contains a number of .jsp and .jpg files. This is what happens: I get a 404 (page not found). If I either rename the directory from "mytest" to something else or change the test.mytest package to something else, it works. In other words there is some sort of name conflict on mytest. Can anyone tell me 1) why this occurs? 2) what's the fix (besides what I tried above) and 3) is this a bug or am I misunderstanging something configuration-wise? Thanks, Kit Cragin
Re: bug/feature? deploying servlet (name conflict)
actually it turns out I went off on a wild goose chase, but you got me to look at the code closer. I did the really brain-dead thing of not specifying my servlet class as "public"! I'm going to claim lack of sleep as my excuse... - Kit - Original Message - From: Noah Nordrum [EMAIL PROTECTED] To: Kit Cragin [EMAIL PROTECTED] Sent: Tuesday, March 07, 2000 3:58 PM Subject: Re: bug/feature? deploying servlet (name conflict) are you calling http://localhost/servlet/runtest ? that or http://localhost/servlet/test.mytest.TestServlet are the correct calls(assuming localhost is the intended hostname of course ;} ) Noah Nordrum [EMAIL PROTECTED] Hyperride Technologies - Original Message - From: "Kit Cragin" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Tuesday, March 07, 2000 2:47 PM Subject: bug/feature? deploying servlet (name conflict) I have a servlet defined in a package and I tried deploy it by adding the following entry to orion/default-web-app/WEB-INF/web.xml: servlet servlet-nameruntest/servlet-name servlet-classtest.mytest.TestServlet/servlet-class /servlet and then copying the package structure to orion/servlets, creating for example this directory hierarchy: orion/servlets orion/servlets/test orion/servlets/test/mytest orion/servlets/test/mytest/TestServlet.class I also had a directory named "mytest" in the orion/default-web-app directory. This directory contains a number of .jsp and .jpg files. This is what happens: I get a 404 (page not found). If I either rename the directory from "mytest" to something else or change the test.mytest package to something else, it works. In other words there is some sort of name conflict on mytest. Can anyone tell me 1) why this occurs? 2) what's the fix (besides what I tried above) and 3) is this a bug or am I misunderstanging something configuration-wise? Thanks, Kit Cragin