Hi, im developing servlets, simple beans and jsp pages with JBuilder 4. I have 2 questions:
1. In my jsp pages i generally use two beans, one is a bean related with security issues the other is the bean that processes the requests in the page. SecurityBean simply checks whether session exists and has the right value or not. if session does not exist or does not have the correct value, it redirects the user to the login page with authentication failed message. It works fine, but in my tests i saw that the second bean is also loaded while SecurityBean is making the necessary checks. SecurityBean is loaded, after 0.3 seconds, the other bean is also loaded. I also saw that nearly all the get and set property s of the second bean was called. After this, the page is redirected to login page but there exists unclosed connection to db etc... I can set a variable for the second bean telling that it should omit the get and set property calls but this requires some if checks which is not very convenient.. I need your opinions about this.. 2. i simply use request dispatcher like this, it works fine with the tomcat in JBuilder 4, but when i use it in ApacheTomcat 4 standalone, i get 404.. Interesting thing is that response.sendRedirect works fine for the same addressStr. why can this happen? did i miss sth in my web.xml file? addressStr = "/MobilePBX/jsp/index.jsp"; rd = this.getServletContext().getRequestDispatcher(addressStr); //response.sendRedirect(addressStr); rd.forward(request, response); gokhan, ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
