Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Is there a Struts tag to get a full url?

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm working on a web service and I want to sent the url for the help page in the header of every response.

I thought the Struts url tag would do the trick but it produces a relative url or at least that is what I see when I do the following:

url=<url namespace="/rest/list" action="help"/>

This tag usages produces url=/my-service/rest/list/help

Is there a way to get a url of the form http://<host name>/my-service/rest/list/help

I'm using struts tags in Freemarker so If there is a Freemarker tag that would suffice.
(and the actual syntax in Freemarker is <@s.url namespace="/rest/list" action="help"/>)

Thanks for any help or guidance,
-=beeky
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you looked at the docs for the URL tag?
 
William Stafford
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure I see the point of this game.

I post a question.

You think the question is so stupid or the answer is so obvious that instead of
1. actually answering the question
2. pointing to the docs that answer the question
3. giving any sort of useful advice
4. doing nothing

you reply RTFM. What's the point?
I ask a question because I want an answer.
You respond with a useless reply because you want to point out that, unlike yourself, I am an idiot who can't be
bothered to try to search for an answer before asking for help.

It seems like a huge presumption on your part and a complete waste of time for both of us.

 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So don't waste your time--sorry; won't tell you to RTFM again. Of course, if you *had* RTFM, you would have seen the forceAddSchemeHostAndPort attribute.

My question about you reading it wasn't just me patting myself on my back for having RTFM already, it was asking you if you'd read it. If you had said no, I would have suggested reading it. If you had said yes, I would have asked if you had had a specific problem with the attribute in question.

Do not ascribe to malice that which can be explained by someone who doesn't have a lot of time to spend responding to questions, but rather chooses to do as much as he can in the limited amount of time he has.

I'm sure other people here will be happy to answer your future questions--I'll not annoy you with mine any more.
 
Trust God, but always tether your camel... to this tiny ad.
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!