Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Redirect to an external website from Struts/JSP application

843840Aug 14 2009 — edited Aug 14 2009
Hi All,

I'm new to this JAVA Forum...
Did not know where to post the question so decided to put it here:

I have a web aplpication based on Struts,
My target is to add a link ti the main menu that will redirect to an external web site (eg: www.sun.com)

So I have a file menu.jsp at ~/MyApp/src/webapp/html/tiles

If I'm using SUN it just a attach the www.sunc.com to the application url.
Found that <logic:redirect> tag should be used
Tried:
<div class="my_class">
<logic:redirect href="<bean:write name="menuControl" property="action"/>">
<bean:write name="menuControl" property="label"/>
</logic:redirect>
</div>
but when menu.jsp is opened empty page is getting

the same behavior if I use hardcoded values:
<logic:redirect href="www.sun.com">
Press for SUN
</logic:redirect>

Does anybody know how can I add a link to a JSP page which will redirect to an external website and open it in a new window?

Thank you.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 11 2009
Added on Aug 14 2009
3 comments
2,403 views