html and jsp clashing

E

entfred

I have a java/jsp program and am using this statement in my jsp file:

<%@ page import="java.util.*,test.*" %>

But, I have to use some standard html that includes various images (to
get look and feel
the same for each html and/or jsp form). This means that I need to use
this:

<base href="http://www.test.com/">
....
....
(site specific html)
....
....

The problem is that when I use the base href tag, the jsp program
cannot find the
location of the servlet when I do a forms statement such as this:

<form name="form1" method="post" action="servlet/test.SearchName">

the test.SearchName java program is located on our server and after I
press the submit
button, the program cannot find test.SearchName and gives me an error:

Page Not Found

The address you entered is not a functioning page on our site.
....
....

Does anyone know any way around this, either by modifying the jsp

<%@ page import="java.util.*,test.*" %>

statement or modifying the action="servlet/test.SearchName" parameter
of the form
statement?

If I remove the <base href="http://www.test.com/"> statement, of course
everything
works fine and the servlet runs ok. But, I need the <base href, since
that is part
of the html boilerplate code I am supposed to use.

Thanks for any advice on this.

--- Entfred
 
A

Andrew Thompson

...I have to use some standard html that includes various images (to
get look and feel
the same for each html and/or jsp form). This means that I need to use
this:

<base href="http://www.test.com/"> ....
If I remove the <base href="http://www.test.com/"> statement, of course
everything
works fine and the servlet runs ok. But, I need the <base href, since
that is part
of the html boilerplate code I am supposed to use.

<http://www.w3.org/TR/html4/struct/links.html#h-12.4>
"This attribute specifies an absolute URI that acts as
the base URI for resolving relative URIs. "

This should mean that it does *not* act as a base for other
*absolute* URI's. Code your FORM target as an absolute
URI and it should work.

HTH

Andrew T.
 
E

entfred

No, it does not work as you have it below.
I just found out there is a JkMount statement in a config file I need
to look at.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top