The EL variable is correct, but you can't use deferred EL #{}
in template text in legacy JSP which is the default view technology in JSF 1.x. This is exactly what the error message is trying to tell you.
You need to print it using a <h:outputText>
.
<f:verbatim><param name="HTTPPort" value="</f:verbatim><h:outputText value="#{initParam.myInitParam}" /><f:verbatim>" /></f:verbatim>
(note that I assume that you were already emitting plain HTML using <f:verbatim>
)
Yes, that's one line of ugliness, but that's the payoff of using JSP and one of the main reasons why Facelets was introduced.