*
The moose likes Struts and the fly likes Request fwd ... Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Request fwd ... Error" Watch "Request fwd ... Error" New topic
Author

Request fwd ... Error

Ganesh Gowtham
Ranch Hand

Joined: Mar 30, 2005
Posts: 225

hi friends ....

in one of my module i do have particular scenario...IN JSP PAGE
i have worked more in forwarding to this web page .
In url bar i am gettinghttp:\\localhost\webApp\\www.eprosoft.com

thats Y i cant be fwd to ....

Pls suggest idea....


Thanks, Ganesh Gowtham
http://ganesh.gowtham.googlepages.com
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Try response.sendRedirect("http://www.eprosoft.com");

When you redirect to a site outside your web context, you must specify the full URL including the http://


Merrill
Consultant, Sima Solutions
Ganesh Gowtham
Ranch Hand

Joined: Mar 30, 2005
Posts: 225

Hi Merrill,
Thanks for ur reply , and it working well ....

if page is fwd to www.eprosoft.com if the client access the my home page ,
will the request is via my appln server or direct to internet ...
Pls suggest
Thanks
Gowtham
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
When you call the response.sendRedirect() method, you are sending an instruction back to the browser telling it to redirect to a different location. This means that when the browser redirects to www.erposoft.com, it goes directly to the internet, and does not go through your application server.
Ganesh Gowtham
Ranch Hand

Joined: Mar 30, 2005
Posts: 225

hi Merrill,
Thanks for ur kind reply...

it is designed to local intranet appln project....

Actually when client(in network) who dont have internet connection is
accessing the applnserver he can use...

when i fwd it to "www.google.com" will the end client (who dont have internet ) can use google page...

my aim to intailly connect to appln server and it sud redirect to so google.com , so i taught he can use web ..(i mean internet).

Is there any way my client can use internet , server system (appln server is having internet connection)...

Pls suggest.....

Thsnks for efforts and time spent ....
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I'm not entirely sure I understand what you're asking, but here's a reply based on my best guess.

From what I can understand of your post, it sounds like you have some users who are restricted from accessing the internet, but are able to access the J2EE Application server running your Struts application via some sort of intranet. If you are asking whether these users can use the application server as a way to get out to the internet, the answer is no. As I mentioned earlier, when you do a response.sendRedirect() it merely sends a response back to the browser telling it to access a different URL. If a user is not able to see www.google.com by typing it into her browser command line, your application will not be able to redirect to it.
Ganesh Gowtham
Ranch Hand

Joined: Mar 30, 2005
Posts: 225

Hi Meril
Thanks for ur kind reply .
Waht you understood is right and apt one...
Is there any way to acheive to situation via controller conponet as well .
Like fwd via controller , i guess even though as u said it will fwd to www.google.com...

Is there a any conplicated way that my intranet clients*those sho dont have internet ) can access the inetrnet via my Appln server...

Pls suggest ...
Thanks for ur reply...
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I'm not aware of any way an application server can do this. A J2EE web container is desinged to serve dynamic pages from the resources on the system upon which it is running. It is not designed as a bridge to forward users on to other sites.

What you want is the function of a router. There are other hardware/software combinations that can do this, but don't look to your java application server to do it.
 
Don't get me started about those stupid light bulbs.
 
subject: Request fwd ... Error
 
Similar Threads
Value shows up in url
Restoring the last page visited
Request FWD Error
Session Management Still weird
HFJS - small doubt