Thanks. It worked ...

There is another problem i am facing in invoking a servlet named blobserve
as follows -

<IMG
src="blobserve?SQL=select+blob+from+apply_images+where+image_name='formimage
'"></IMG>

This servlet is supposed to accept a SQL query as parameter, execute it and
return the result .I get this error when i invoke the servlet .

javax.servlet.ServletException: executeQuery requires a non-NULL SQL
statement
        at blobserve.processRequest(blobserve.java:81)
        at blobserve.doGet(blobserve.java:128)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)


However if i break up the SQL query in 2 parts and pass 2 parameters , SQL1
& SQL2 which are concatenated in the servlet , it works.

<IMG src="blobserve?SQL1='select blob from apply_images where
image_name'&amp;SQL2='university'" ALIGN="TOP"></IMG>

What could be the reason for the above ?

Thanks in advance,
Shruti
-----Original Message-----
From: Kwok Peng Tuck [mailto:pengtuck@;makmal.com]
Sent: Monday, November 11, 2002 12:06 PM
To: Tomcat Users List
Subject: Re: servlet mapping


Try without the forward slash . So it looks like this:

<FORM METHOD="GET" ACTION="auditor"> 




Shruti Ahuja, Noida wrote:

>Hi,
>
>I have deployed a web appplication whose context name is graduate . It has
2
>servlets(named auditor and blobserve) in it placed in the Web-inf/classes
>directory . 
>I have mapped the 2 servlets in web.xml as follows -
>  <servlet>
>    <servlet-name>auditor</servlet-name>
>    <servlet-class>auditor</servlet-class>
>  </servlet>
>  <servlet>
>    <servlet-name>blobserve</servlet-name>
>    <servlet-class>blobserve</servlet-class>
>  </servlet>
>  <servlet-mapping>
>    <servlet-name>auditor</servlet-name>
>    <url-pattern>/auditor</url-pattern>
>  </servlet-mapping>
>  <servlet-mapping>
>    <servlet-name>blobserve</servlet-name>
>    <url-pattern>/blobserve</url-pattern>
>  </servlet-mapping>
>
>Now, i wish to invoke the auditor servlet in the jsp page as follows -
><FORM METHOD="GET" ACTION="/auditor"> 
>The above does not work . When called it removes the context name from the
>URL .
>However , the following works -
><FORM METHOD="GET" ACTION="servlet/auditor">
>What should i change in the web.xml or the jsp page so that i can invoke
the
>servlet without the /servlet clause. 
>
>Pls suggest ..
>
>Thanks
>Shruti.
>
>--
>To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
>For additional commands, e-mail:
<mailto:tomcat-user-help@;jakarta.apache.org>
>
>
>  
>



--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@;jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>

Reply via email to