Dear all,

i solved my second problem, with changing the address from
addressStr = "/MobilePBX/jsp/index.jsp";
to
addressStr = "/jsp/index.jsp";

but i still have my first problem.. maybe posting it to jsp-interest will
be better..

thanks

gokhan




                    GOKHAN TUNA
                    <[EMAIL PROTECTED]       To:     [EMAIL PROTECTED]
                    R>                          cc:
                    Sent by: "A mailing         Subject:     bean and request 
dispatcher prob.
                    list for discussion
                    about Sun
                    Microsystem's Java
                    Servlet API
                    Technology."
                    <SERVLET-INTEREST@JAV
                    A.SUN.COM>


                    04/09/2002 08:28 AM
                    Please respond to "A
                    mailing list for
                    discussion about Sun
                    Microsystem's Java
                    Servlet API
                    Technology."






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

___________________________________________________________________________
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

Reply via email to