views:

16

answers:

2

I hava a web page with a link like something like <a href=myPage/MyServlet&param=12>... and MyServlet is a servlet deployed in Apache-Tomcat, but when I click that link I get a error 404. So can't I pass parameters to my srevlet? I need to configurate something more in apache?

A: 

404 means page not found, so the URL you are clicking links to a page that does not exist.

What is the URL of the page with the link on it? What is the (full) URL of the page you want to link to?

Richard Fearn
A: 

You probably want

<a href=myPage/MyServlet?param=12>...
                        ^  ("?" instead of "&" as you posted in your question)

You get a 404 because the page myPage/MyServlet&param=12 does not exist.

The syntax of a link is www.example.com?param1=val1&param2=val2&param3=val3, that is, ? separates the query from the URL, and the & separates parameter/value pairs.

aioobe
Yes, that was all.
Dorr