You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rob Breeds <Ro...@uk.ibm.com> on 2001/12/06 22:32:32 UTC

html:base screwing mappings - please help

Hi

Everything was going so well but now I've hit a problem which affects my
whole project. I really would appreciate some help.

Here's the situation:

I have a form and I want to submit it using links and not buttons. I have a
JavaScript function to do this:

function subForm(iform, act) {
validate(iform);
iform.action="Publish." + act + ".do";
iform.submit();
}

and I call it with a link like this:

<html:link href
="javascript:subForm(document.forms[0],'Entity.Advanced');">Publish
Entity</html:link>

The function then generates the action url of 'Publish.Entity.Advanced.do'
and sets the form's action property to this. The form is submitted using
that action url and it works fine.

But, all my JSPs are under WEB-INF/pages for the security reasons that Ted
Husted has explained.

Now, if I add <html:base/> my form doesn't work at all - I get an error: '
Error 400: Invalid path /WEB-INF/pages/Publish.Entity.Advanced was
requested '

and the html source now shows in place of the html:base tag:
<base href="http://localhost:9080/myApp/WEB-INF/pages/simpleinput.jsp">
which reveals the location of my web pages on the server!

What is the point of <html:base/>? And can it be used if my pages are under
WEB-INF?


Please help

Thank you

Rob Breeds




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>