You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "MW Mike Weiner (5028)" <MW...@ag.com> on 2006/04/03 20:51:40 UTC

Tomcat tag question

Dear List readers
 
Sorry to bother you with what is most likely a silly question, but i
have been googling, and found no real answers and was hoping you might
know. I am doing another Tomcat project and to that end, i need to get
tomcat to behave in a certain way, namely i need tomcat to add an html
tag to each page requested, like so:
 
<meta name="agmips" value="1.963752">
 
where the value is a box identified (bad# good# bad# good# bad# good#) -
672 in this case, actually i would LOVE to be the hostname of the box,
but can be anything really - even static if it cant be done dynamically.
Is this possible? And if so, would you mind sharing the trick with this
newbie?
 
Thanks in advance
Michael Weiner

Re: Tomcat tag question

Posted by "Darryl L. Miles" <da...@netbauds.net>.
MW Mike Weiner (5028) wrote:
> Dear List readers
>  
> Sorry to bother you with what is most likely a silly question, but i
> have been googling, and found no real answers and was hoping you might
> know. I am doing another Tomcat project and to that end, i need to get
> tomcat to behave in a certain way, namely i need tomcat to add an html
> tag to each page requested, like so:
>  
> <meta name="agmips" value="1.963752">
>  
> where the value is a box identified (bad# good# bad# good# bad# good#) -
> 672 in this case, actually i would LOVE to be the hostname of the box,
> but can be anything really - even static if it cant be done dynamically.
> Is this possible? And if so, would you mind sharing the trick with this
> newbie?
>   

Hmm... Isn't this a job for JSP.  Rename your index.html to index.jsp 
and add a new first line of:

<%@ page language="java" %>


Then insert this into the point you want the page output to change:

<meta name="agmips"value="<%=request.getServerName()%>">


Best of luck,
 

-- 
Darryl L. Miles



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org