Hello Mike,

As i said:
The path to my servlet is: "C:\tomcat401\webapps\ROOT\WEB-INF\classes\qc\achizitii"
My servlet is called "Tiparire.class"
The path for my jsp pages is: "C:\tomcat401\webapps\ROOT\qc\achizitii"
Can you help me set up my server ?

Thanks in advance...
Alex

Thursday, June 20, 2002, 7:41:03 PM, you wrote:

MJ> You need to do a number of things, assuming that I understand the question.

MJ> 1) create your servlet (duh)

MJ> 2) create jsp (duh also)

MJ> 3) modify WEB-INF/web.xml

MJ>         add servlet entry for the servlet, should look something like this:

MJ>         <servlet>
MJ>                 <servlet-name>foo</servlet-name>
MJ>                 <servlet-class>org.somewhere.Bar</servlet-class>
MJ>         </servlet

MJ>         add a mapping for a file extension to the servlet, looks like this:

MJ>         <servlet-mapping>
MJ>                 <servlet-name>foo</servlet-name>
MJ>                 <url-pattern>*.form</url-pattern>
MJ>         </servlet-mapping>

MJ>         Note: the name of the servlet should be the same in both places and in
MJ>         order to have tomcat auto-magically map the request to the servlet you
MJ>         need have the link or action have the extension that you specify in the
MJ>         url-pattern.

MJ> Now there's an added complication if you're not running tomcat stand alone
MJ> (ie
MJ> using mod_jk and apache or something) in that you'll need to also tell the
MJ> front end web server to pass the requests for your mapping through to tomcat
MJ> as well (this is the part that I *always* forget about).

MJ> If you have any problems setting this up email and I'll try to answer
MJ> questions
MJ> or provide examples.

MJ> --mikej
MJ> -=-----
MJ> mike jackson
MJ> [EMAIL PROTECTED]

>> -----Original Message-----
>> From: Alex [mailto:[EMAIL PROTECTED]]
>> Sent: Thursday, June 20, 2002 9:17 AM
>> To: [EMAIL PROTECTED]
>> Subject: calling servlets from jsp
>>
>>
>> Hello,
>>
>>  I want to call a servlet from a jsp ( i mean, when i press a button
>>  in the html file generated by the jsp, i want to call a servlet).
>>  for ex: document.location.href = "SERVLET";
>>  How can i do this ?
>>
>>  Thanks in advance...
>>  Alex.
>>
>>
>>
>> --
>> To unsubscribe, e-mail:
>> <mailto:[EMAIL PROTECTED]>
>> For additional commands, e-mail:
>> <mailto:[EMAIL PROTECTED]>
>>
>>


MJ> --
MJ> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
MJ> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to