jsp forward problem

Hi ,

I am using a jsp in which a servlet checks the user authentication and displays a page according to it using RequestDispather.If it's sucess then displays the normal page ...if it fails then displays the Error Page.

On development server it's working fine but on the Production server same code ..when user authentications fails it displays Error message on the top and normal page below that.It has 2 <html></html> tags in a same jsp.

We are using weblogic 6.1 on Solaris server.

Any ideas where I am missing something

Thanks

Rajeev

[597 byte] By [rajeevbakhru] at [2007-9-27 16:54:16]
# 1
Why does it have two <html></html> tags? Try eliminating one
juani1 at 2007-7-6 1:11:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Hi,

Actually I am calling a servlets from a jsp like this

<jsp:include page="sessionTrack"/>. sessionTrack is a servlet which takes care of the user authentication. If it succeeds then it uses RequestDispatcher to call a blankPage.jsp otherwise another jsp which forwards to another jsp like this

<jsp:forward page="validLoginError.jsp"/> and this page displays the error message.

Is this correct ?

But this code is working on 2 of my development server properly.

But on the production server when authentications fails it shows error message (jsp file where req was forwarded) and main jsp file ..with 2 html tags

I am confused why its working on 2 servers and not on other one .....

Thanks

Rajeev

rajeevbakhru at 2007-7-6 1:11:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

[nobr]I don't know how servlets are used when included but I think you would be better off using a login form and posting to the servlet. For example:

<!-- login.jsp -->

<form name="loginForm" method="post" action="sessionTrack">

Userid: <input type="text" name="userid"><br>

Password: <input type="password" name="password"><br>

<input type="submit" name="submit" value="submit">

</form>

Then in your servlet authenticate the person an send them to the appropriate page.

[/nobr]

njswan at 2007-7-6 1:11:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

Hi,

Is it possible that the first include (SessionTrack) is adding content to the response and finally in when you forward to validLoginError.jsp that is adding the html tags to the response.

venkat.

> Hi,

> Actually I am calling a servlets from a jsp like this

>

> <jsp:include page="sessionTrack"/>. sessionTrack is a

> servlet which takes care of the user authentication.

> If it succeeds then it uses RequestDispatcher to call

> a blankPage.jsp otherwise another jsp which forwards

> to another jsp like this

> <jsp:forward page="validLoginError.jsp"/> and this

> page displays the error message.

>

> Is this correct ?

> But this code is working on 2 of my development server

> properly.

> But on the production server when authentications

> fails it shows error message (jsp file where req was

> forwarded) and main jsp file ..with 2 html tags

>

> I am confused why its working on 2 servers and not on

> other one .....

>

> Thanks

> Rajeev

>

>

>

>

>

>

>

>

ambativ at 2007-7-6 1:11:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...