Hi Daniel- 1) You can set up a Session Listener, which is a class which implements HttpSessionListener. You implement 2 methods, sessionCreated() and sessionDestoryed() to do what you need to. This will need to be added to web.xml file under a <listener><listener-class>class path and name</listener-class></listener>. Here is an old article but it's still valid, and discusses the different kind of servlet events you can trap: http://www.onjava.com/pub/a/onjava/2001/04/12/listeners.html?page=1
2) You need an entry in your struts-config.xml file which associates your action class with an action path. It sounds like you might not have set this up. It would look something like this, inside of an action-mappings entry. There's other entries that need to be in your struts config too. <action path="/DefaultAction" type="[class path].DefaultAction" name="[your form bean name]"> <forward name="success" path="default_success.jsp"/> <forward name="failure" path="error_page.jsp"/> </action> In web.xml, declare the request procesor and add a servlet mapping that will send all files ending with *.do to the struts request processor: <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping><servlet-name>action</servlet-name><url-pattern>*.do</url-pattern></servlet-mapping> It's a lot of stuff to do in web.xml, but at least you only need to set it up once. Here's a great intro to struts, should help you get up and running: http://www.reumann.net/struts/main.do Good Luck! -ed On 7/21/05, Daniel Łaś <[EMAIL PROTECTED]> wrote: > Hi > > I'm new to Struts and have two questions: > 1. How can I define common session initialization routines, eg. I'd like > to run some code every time session is created. > 2. How should I configure struts/tomcat to make PathInfo avalbale? Lets > say I have DefaultAction action configured. When I type > URL: /DefaultAction.do/a/b/c I recive error page _ _saying that > resourceis not available > > Regards and thanks in advance > > -- > Daniel Łaś <[EMAIL PROTECTED]> > > e-direct Polska sp. z o.o. > ul. 1-go Maja 9 > 45-068 Opole > tel. +48 77 44 17 868 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >