html and servlet file

Ads
 

html and servlet file

where to place the html and the servlet class files..in tomcat..

I have placed the html file under root and the class files in class folder..n WEB-INF.

but..i want to access the servlet file through ..the html file..

its showing 404 error.help me pls ;THANK YOU!!

View Answers

October 28, 2011 at 12:05 PM

Put html file with the jsp files amd servlet file insdie classes folder of tomcat.

You have to specify the full path of servlet on html action if you want to call servlet from html like this:

<form method="post" action="http://localhost:8080/examples//HelloWorld">

Here examples is our web application folder(inside webapps folder) and HelloWorld is out servlet. Servlet MApping is also very essential in xml file.

For more information, visit the following links:

http://www.roseindia.net/servlets/PrintingNameUsingHtmlForm.shtml

http://www.roseindia.net/servlets/ServletInsertingDataUsingUsingHtml.shtml

http://www.roseindia.net/servlets/SendRedirectToHtmlOrJspPage.shtml

Ads









Related Tutorials/Questions & Answers:
html and servlet file
html file with the jsp files amd servlet file insdie classes folder of tomcat. You...html and servlet file  where to place the html and the servlet class files..in tomcat.. I have placed the html file under root and the class files
Uploading file in servlet from a html form
Uploading file in servlet from a html form  Sir, I want to upload a picture from my html file and save it to my database as BLOB,but what JAR should i use for this purpose i am really confused about.And also is it possible to do
Advertisements
'Hello World' file from a servlet (PDF, HTML or RTF).
 'Hello World' file from a servlet (PDF, HTML or RTF...; In this program we are going to tell you how we can create three file rtf,pdf and html... of servlet to display "Hello Word " on PDF,RTF and HTML format using iText
servlet file upload
servlet file upload  please tell me the complete code to upload a file on localhost using servlet
Version of cat.inspiracio>html-servlet dependency
List of Version of cat.inspiracio>html-servlet dependency
send HTML Email with jsp and servlet
send HTML Email with jsp and servlet  Can You please show me how to send html Email using JSP and Servlet thank you
jar file with html
jar file with html  I have a jar file. On double click it shows an applet page. Please tell me how to connect that applet into html or jsp page
sending a zip file to servlet
sending a zip file to servlet  I have created a .zip file in a servlet on the local system(no static ip). The .zip file contains xml files. I have to send it to another servlet which is in a server(has a static ip). I have done
NOT ABLE TO MAKE A NEW FILE IN SERVLET
NOT ABLE TO MAKE A NEW FILE IN SERVLET  What is the error in my code? It is not making a new file which contains the string values coming from a HTML... ServletException,IOException { res.setContentType("text/html
Maven Dependency html-servlet >> 0.0.3
You should include the dependency code given in this page to add Maven Dependency of cat.inspiracio >> html-servlet version0.0.3 in your project
Maven Dependency html-servlet >> 0.0.2
You should include the dependency code given in this page to add Maven Dependency of cat.inspiracio >> html-servlet version0.0.2 in your project
convert an pdf file to html in Java
convert an pdf file to html in Java  Hi all, How to convert an pdf file to html in Java? Currently all my data is generated into a report in pdf and i want to be able to generate it to html page as well. How to go about
file uploadind - JSP-Servlet
file uploadind   had pasted the provided 2 files(1.index_single_upload.jsp, 2.Sinle_upload_page.jsp) for file uploading it is showing errors in the apache tomcat like "content type cannot be resolved to a type" pls help
How to Open a File in HTML Form
How to Open a File in HTML Form  Hi, My question in that how could i open a file in HTML Form. Could any one suggest me the examples or online help... it. Otherwise take this examples and syntax that will show how to Open a file in HTML
html dropdownlist code - JSP-Servlet
html dropdownlist code  hi how to get textfield in html when i select the option others in the dropdown list, pls provide the code?   Hi Friend, Try the following code: function show(){ var op
Where is servlet log file in net beans?
Where is servlet log file in net beans?  When you use context.log("some string"); then the string get written into the servlet log file. But where is the servlet log file in netbeans? I am using netbeans 6.9. I can't locate
Version of com.semanticcms>semanticcms-file-servlet dependency
List of Version of com.semanticcms>semanticcms-file-servlet dependency
How display a image on servlet from file upload - JSP-Servlet
How display a image on servlet from file upload  Dear Sir, My issue is: How display a image on servlet from file upload I receive your answer today....jar and set that on classpath.I keep the servlet file in javacode package. First
Create an HTML file AddCookies.html which contains four text boxes
Create an HTML file AddCookies.html which contains four text boxes  Create an HTML file AddCookies.html which contains four text boxes .When user... will be sent to AddCookies.java servlet and get saved in cookies
how to execute the below servlet with html page
how to execute the below servlet with html page  //vallidate user n...,ServletException { res.setContentType("text/html"); PrintWriter out=res.getWriter... res)throws IOException,ServletException { res.setContentType("text/html
compiling a uploaed java file - JSP-Servlet
compiling a uploaed java file  How a uploaded java source file is automatically compiled(i.e converted to .class file) in server using jsp/servlet
HTML File Upload
HTML File Upload       HTML File Upload is used to show the list of all file, when a user click... an example from HTML File Upload. In this code, we create a html page which show you
javascript code for search in html file
javascript code for search in html file  Hi, I am looking for javascript code through which we can search data with specific name find in any rows in the table. Example: Id Name P001 A P002 B P003 C P004 P002 P005
Generate pdf file - JSP-Servlet
Generate pdf file   Hi Friends, How to generate the pdf file for the jsp page or in servets  Hi Friend, You need to download itext api. After that set the classpath and try the following code
how to fetch values from .properties to a html file
how to fetch values from .properties to a html file  I have a .properties file with some key value pairs in it. I need to fetch the values from this .properties file into a html file.Please let me know how to do
Create XML File using Servlet
Create XML File using Servlet   ... file using Servlet  We have created  file XmlServlet.java. It creates XML file with its version and encoding and display a message 'Xml File Created
how to use ajax in html file
how to use ajax in html file  <!DOCTYPE html PUBLIC "-//W3C//DTD...; <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <..." /> <meta http-equiv="Content-Type" content="text/html; charset
inserting multiple file formats into database using html
inserting multiple file formats into database using html   hi the code was working fine,i want to choose the file and then upload to database,by using html.whether it is possible to upload larger file size,please explain
upload a file and write it in JSP using servlet
upload a file and write it in JSP using servlet  Hello, I'm facing a problem here. I want to upload a file through abc.jsp and write the contents of file using a servlet in xyz.jsp. It is supposed to be a excel file which
Getting Parameter from a css styled jsp file to a java servlet file...
Getting Parameter from a css styled jsp file to a java servlet file... ...; java servlet file-- /* * To change this template, choose Tools... is it not getting the parameter??? How do i accept the value in the servlet file
servlet sendredirect
servlet sendredirect  how to write html file code for this program

Ads