how to call servlet from jsp

i m trying to call it from jsp using

<a href="../purchaseP?orderno=<%=pno%>"><%=pno%></a>

but its giving error..

type Status report

message HTTP method GET is not supported by this URL

description The specified HTTP method is not allowed for the requested resource (HTTP method GET is not supported by this URL).

[373 byte] By [meenakshimishraa] at [2007-11-27 7:37:45]
# 1

hi

u can display the output of ur servlet program by using

< Img src > tag

for example

<img src ="http://localhost:8080/urproject name/ur servlet program name" />

just attach this tag to ur jsp , their u can see out put of ur servlet

, i guess it will help u

gagnma at 2007-7-12 19:18:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
thanks..can u plz tell me...how to call servlet throgh jsp using forword tag..
meenakshimishraa at 2007-7-12 19:18:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
well something like this:<jsp:forward page="/YourServletName"/>The value in the "page" must match the url-pattern of your servlet of course.
gimbal2a at 2007-7-12 19:18:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

> i m trying to call it from jsp using

>

> <a href="../purchaseP?orderno=<%=pno%>"><%=pno%></a>

>

> but its giving error..

>

> type Status report

>

> message HTTP method GET is not supported by this URL

>

> description The specified HTTP method is not allowed

> for the requested resource (HTTP method GET is not

> supported by this URL).

Are you implementing the doGet or doPost method in your servlet? If you are calling from a hyperlink then it needs to be implementing the GET method. To access the POST method use a html form.

ita6cgra at 2007-7-12 19:18:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...