George Mu wrote: > > Hi everybody, > > Robert and I have cooperated to provide our version of the instructions for > the security example, and would like to share our experiences with all other > memebers in this mail list. Phillippe, are there any changes for this > example in the next release of JOnAS? > > Thanks, > George > > INSTRUCTIONS > > (NOTE: You must have followed all the steps necessary for setting up the > beans first. This includes compiling those files, and setting up a > jonas.properties file and a jonas-users.properties file in that folder: > %JONAS_ROOT%/examples/src/security/sb) > > STEP ONE > ---------------------------------------------------------------------------- > 1.Compile a new class: > org.objectweb.jonas.security.tomcat.interceptor.SecurityCtxInterceptor32 > a. This replaces SecurityCtxInterceptor31 which handles security from > the old tomcat. > b. The code for this (with instructions) is located at: > http://www.objectweb.org/messages/JonasUsers/2001/04/msg00012.html > c. NOTE: to compile, you will need tomcat's webserver.jar in your > classpath, as well as RMI_jonas.jar (or JEREMIE_jonas.jar if you're using > that instead of RMI). Both are located in %JONAS_ROOT%/lib. > > STEP TWO > ---------------------------------------------------------------------------- > 1. Update RMI_jonas.jar (or JEREMIE_jonas.jar) to include the new class. > a. Both are located in %JONAS_ROOT%/lib > b. In the folder (%JONAS_ROOT%/lib), create the folder structure: > org/objectweb/jonas/security/tomcat/interceptor/ > c. Put your new class in that folder (the above one - interceptor) > d. At a command prompt go to the dir %JONAS_ROOT%/lib > e. type: > jar uvf RMI_jonas.jar > org\objectweb\security\tomcat\interceptor\SecurityCtxInterceptor32.class > > (NOTE THE ABOVE CODE MAY HAVE WRAPPED IN THE EMAIL) > 1. NOTE: the "\"'s are for windows, unix uses "/" > 2. Delete the folder "org" (and it's inner folders) from > %JONAS_ROOT%/lib > > STEP THREE > ---------------------------------------------------------------------------- > (This step is basically what JOnAS has for instructions): > http://www.objectweb.org/jonas/jonas_root/doc/Install.html#Running > (look at "Running the secured Session Bean example") > > 1. Start up a registry. You can do this by going to: > a. %JONAS_ROOT%\bin\nt (for windows) > b. %JONAS_ROOT%/bin/unix (for unix) > and running RMIRegistry.bat (or RMIRegistry.sh on unix) > > 2. Copy the "ejbSample.war" file (in %JONAS_ROOT%/examples/src/ejbSample) > into "$TOMCAT_HOME/webapps" > > 3. In new command prompt, move to %JONAS_ROOT%/examples/src/security/sb > Start the server by typing: > EJBServer > > NOTE: THE NEXT FEW STEPS WILL WORK, BUT THE EXAMPLE WILL NOT, THAT IS OK. > YOU NEED TO DO THIS, SO TOMCAT WILL EXTRACT THE ".war" FILE AND GIVE YOU THE > FOLDERS YOU NEED. > > 4. Run tomcat > a. In another command prompt, go to %TOMCAT_HOME/bin, and type: > config_env > b. In %TOMCAT_HOME/bin, type: > startup > > 5. In a browser go to the page in tomcat. > (http://<tomcat-site-name>:<port>/ejbSample > a. EXAMPLE: > http://localhost:8080/ejbSample > NOTE: ejbSample is CASE-SENSITIVE!! > > 6. Follow the instructions in the web page as far as it will go. (IT WILL > NOT ALL WORK) > > STEP FOUR > ---------------------------------------------------------------------------- > 1. Stop Tomcat (in the command prompt in Tomcat's bin folder) type: > shutdown > > 2. In the folder now created in the webapps > folder(%TOMCAT_HOME%\webapps\ejbSample) > a. Add a folder called "secured" > b. Move Op.html into the "secured" folder > 3. Compile the OpServlet.java, which is located in > "ejbSample/WEB-INF/classes".After compiling, LEAVE it in that "classes" > folder > > 4. If you stopped RmiRegistry or EJBServer, start them again as the above > steps laid out. > > STEP FIVE (FINAL) > ---------------------------------------------------------------------------- > 1. In command prompt for tomcat make sure you are in %TOMCAT_HOME%/bin > 2. type config_env(If you don't close the Tomcat window that have run in the > previous steps, config_env can be skipped in STEP FIVE) > 3. Run tomcat. (type: startup) > 4. Run the sample in a browser, and it should work!!! > > -----END-------------------------------------------------------------------- > - Thank you for your instructions for the security example. I think you must be aware that in the next JOnAS version you will not obliged to compile the new class SecurityInterceptor32 and to update the xxx_jonas.jar because this class will be present by default in the RMI(JEREMIE)_jonas.jar thanks again regards, -- Philippe Philippe Coq Evidian Phone: (33) 04 76 29 78 49 Bull S.A - 1 rue de Provence - 38432 Echirolles Cedex France Download our EJBServer at http://www.objectweb.org ---- To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "unsubscribe jonas-users". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
