• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Strange response.sendRedirect() problem

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,

First off, I'd like to say that I did search these forums for a solution to my problem, but none seemed similar to mine. Also, I'm using Oracle Application Server 10.1.3 (which uses a modified Apache HTTP server), and the problem might just as well lie there. Anyway, I though I'd ask here to see if anyone has a clue as to what might be the problem.

When users arrive at the web app, index.jsp is loaded, which is a page containing several frames. They enter their user name and password here, and press the "login" button. The data is posted to a page called LoginAction.jsp. This checks the request data, and then performs a sendRedirect. However, the page doesn't seem to be redirected (or cannot be found).

This is the redirect code in LoginAction.jsp:



As you can see, I do have a "return;" behind the sendRedirect(). Now, when I login with IE, I get an "Action canceled" page, stating IE was "unable to link the web page you requested". When I use Mozilla, nothing happens after pressing the button.

Now, when using a <jsp:forward>, it does work. You may call me lazy, but I used the sendRedirect throughout several web apps, and I would like to get this working.

Something else I should mention... We're behind a firewall here. The server is inside the LAN (obviously), and when I browse to it from within the LAN, it works just fine. When I use an outside line, and enter through the firewall to access the web app, the sendRedirect fails.

Reading over this post, it's probably not the code that's at fault, but some setting somewhere... On the http server or on the firewall...

Anyone have a clue?
Also, would you advise me to use <jsp:forward> instead of sendRedirect?

Thanks,

sca

[ July 13, 2006: Message edited by: ]

[ July 13, 2006: Message edited by: ]
[ July 13, 2006: Message edited by: ]
 
Stan Ca
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Found it.

Some silly setting in the httpd.conf configuration file of the Apache server was the cause. Namely UseCanonicalName, which defaults to 'On' but should be 'Off' in this case.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moved to the Oracle forum as this turned out to be a configuration problem.
Thanks for posting back.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sca
Welcome to JavaRanch!

We're pleased to have you here with us in the Oracle/OAS forum, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

You can change it here
 
Stan Ca
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Owkay. Changed.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, not owkay.

Please read Ben's instructions once more and change your display name to a first name and a last name. Initials for a last name are not acceptable.

bear
JavaRanch sheriff
 
Stan Ca
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay, sorry, merely skimmed the contents of that name policy.
Never meant to be obtrusive (or offensive or whatever).

Anyway, changed the name again. Please review it to see whether it is "real" enough. Unfortunately, the name in the posts doesn't seem to get updated (though the topic starter name is correct). Need I create a new login?

EDIT: never mind, the display name in the posts did change too.
EDIT2: slightly changed name again; sorry for that.

[ July 13, 2006: Message edited by: Stan Ca ]
[ July 13, 2006: Message edited by: Stan Ca ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic