Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 Linking

 
Abhilash Chander
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Im trying to link to an external website throgh struts 2 <s:a> link. The generated link is something like this 'http://localhost:8084/worldWatch/www.gregorypacks.com/', it includes my local application context too. which ofcourse makes it a wrong link. I dont know what I am doing wrong. Here is my Code :


And i want to open it in a new window. I dont know how that is possible. Kindly try solving my problem thanks in advance.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why would you use the anchor tag for linking to an external URL? I wouldn't.
 
Abhilash Chander
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the reply david. so which tag i should use and how to open the link in a new window. thank you for your time and effots.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just use the standard HTML anchor tag.
 
madhus mukthas
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Should open the result in a new page. Not sure of the other part of your question.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic