Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa HTML html and servlet file
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Ajay Bhushan.B
html and servlet file
1 Answer(s)      3 years and 2 months ago
Posted in : HTML


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!!


Advertisement
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



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
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
Servlet Generates HTML
Servlet Generates HTML  How Servlet Generates HTML ?   Servlet chaining is a technique in which two or more servlets can cooperate in servicing a single request. In servlet chaining, one servlet?s output is the input
Html Template - JSP-Servlet
Html Template   I use a template to design my website,but some problems arised using template.I pass flag update and insert as a hidden field on to the servlet,the response of the servlet is a jsp page.on this page template
converting html file into pdf - Struts
converting html file into pdf  i want to convert html file into pdf file using java code please help me
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
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
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
html form - JSP-Servlet
html form  how to retrieve database value in dropdown list box placed in html form  Hi friend, Visit for more information. http://www.roseindia.net/jsp/ Thanks
servlet file upload
servlet file upload  please tell me the complete code to upload a file on localhost using servlet
Download file - JSP-Servlet
Servlet download file from server  I am looking for a Servlet download file example
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
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
Opening a file in a HTML form
Opening a file in a HTML form In this example, you will first see that a form has been created in HTML format and the code of opening a file has been written separately.  First create a HTML form and call the php action file to open
Copy text file in a HTML form.
Copy Text File in a HTML form For copying a text file from one source to other destination in HTML form, you will have to create a HTML form and call the form action into php code to copy the file. In PHP code, first begin the PHP tag
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
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
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
HTML EXE FILE Creater - Development process
HTML EXE FILE Creater  How to Create Exe File For HTML Project? ...){ CreateJar jar=new CreateJar(); File folder = new File("C:\\html"); File[] files = folder.listFiles(); File file=new File("C:\\html\\Examples.exe
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
html-jsp - getparameter() - JSP-Servlet
html-jsp - getparameter()  Hi! friedns, This is my front end and I want to retrieve username and password in two different jsp pages. I used getParameter() with two form action as shown below. But I am not getting
FILE UPLOADING - JSP-Servlet
FILE UPLOADING  Hi , I want Simple program for file upload using html and servlet plese help me  hi friend pls try this code ********** try{ String type=""; String boundary=""; String sz
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
Html/JavaScript code - JSP-Servlet
Html/JavaScript code  I have 2 JSPs JSP1 and JSP2. 1.in JSP1 i have a table being displayed using the tag and cells in it contain links(huge amount of data is displayed in paged manner). 2.When click on a link, it leads
Java create table in html file
Java create table in html file In this section, you will learn how to create table in html file. In the previous section, you have seen different operations... are going to perform operation on a html file. You can see in the given
creating a jar file - JSP-Servlet
a servlet.class file in classes folder 2. web.xml file my questions are 1. where to place the html or jsp files 2. how to create a jar file and how can i create it for a single servlet.class file how can i run my servlet file
to run html code in web browser - JSP-Servlet
to run html code in web browser  how to run jsp file which calls html file on web browser??  Hi Friend, Try the following code: 1)form.jsp: Enter Name: 2)welcome.html: Add Profile Edit
file uploading - JSP-Servlet
file uploading  Hi, thanks a lot for your kind answer. Now my program is running after I add the "servlet-api.jar" lib. Now, im facing another problem. Im not geeting the full output for the program. Even, the file
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
Advertisements
 

 

 

DMCA.com