Web app questions
Hi all, I'm trying to set up a small application similar to Java Pet Store Web Tier and I got the following problems/questions: 1) my main servlet main.jsp is mapped to /control/*, I set up a protected zone at /control/signin but unfortunately when I go to /control/signin orion server serves me main.jsp. Is it a bug or that's my (and JPD engeneers') misunderstading of the spec? 2) I thought I could work around this problem by setting up a new protected domain which is not under control directory. So I added the following lines in web.xml: security-constraint web-resource-collection web-resource-nameAuthentication zone/web-resource-name descriptionno description/description url-pattern/protected/signin.jsp/url-pattern http-methodPOST/http-method http-methodGET/http-method /web-resource-collection auth-constraint descriptionno description/description role-namecustomer/role-name role-namesubscriber/role-name /auth-constraint user-data-constraint descriptionno description/description transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint login-config auth-methodFORM/auth-method realm-name/realm-name form-login-config form-login-page/login.jsp/form-login-page form-error-page/error.html/form-error-page /form-login-config /login-config now when I try to access /protected/signin.jsp I see my login dialog but after I press sumbit button Orion shows me: "403 Forbidden Directory browsing not allowed" !! What does it mean? The /protected/signin.jsp does exists, did it authenticate me? !!! 3) I have refs to images in login.jsp ("images/...") and when login form appears in response to "protected/signin.jsp" the server couldn't find them, but the original login.jsp is just under context root! How come it cannot find images directory which does exist? Maybe login.jsp is invoked as it were located in /protected directory? Thanks in advance, Egor.
Java pet store demo problem
Hi, I'm trying to make the Java Pet Store Demo work under Orion... well, 1) there are problems with custom tags: suprisingly enough when my doStartTag() return EVAL_BODY_TAG the body doesn't gets evaluated at all, but if it returns SKIP_BODY it works!!! (I modifiyed a little tag handlers). I modifyed tag handlers so that don't use doStartTag() and now it works. 2) when I try to add an item to the shopping cart RemoteException (Recursive call to a non reentrant bean) is thrown in handleCartEvent method of StateMachine.java : ... case CartEvent.ADD_ITEM: { try{ Collection itemIds = ce.getItemIds(); Iterator it = itemIds.iterator(); while (it.hasNext()) { cart.addItem((String)it.next()); // exception is thrown }... Question, why the exception is thrown? Does a call from helper class (StateMachine) to TheSCC (SessionBean) is not legal loopback? If so why it works in J2EE RI? Thanks, Egor
ejb references
Hi, I tried to deploy a simple EJB and it turned out that in order to get this EJB referenced from my JSPits reference in JSP code should coincide with the location specified in both orion-ejb-jar.xml and orion-web.xml. It seems to me that it is not correct with the spec or I am missing something obvious? My JSP looks like: ... InitialContext initial = new InitialContext(); Object objref = initial.lookup("foo");fooHome home = (fooHome)PortableRemoteObject.narrow(objref, fooHome.class);fooRemote foo = home.create();String hello = foo.sayHello();out.println(hello); ... My orion-web.xml: ... ejb-ref-mapping name="foo" location="ejb/foo" / ... My orion-ejb-jar.xml: ... session-deployment name="fooEJB" location="ejb/foo" wrapper="SessionHomeWrapper1" timeout="1200" persistence-filename="fooEJB"... So this code doesnt work withthrowing naming execption, but if I reference EJB from my JSP as ejb/foo evth works fine!! Is it a bug? Thanks in advance. P.S. The same is with resource refs.