Deploying Servlet with HTML file on Tomcat

Hi ,
I created a servlet and an html file. The html file accepts user data and passes it to servlet.
I want to deploy these two files using Tomcat server. Please tell me a sure procedure for deploying both files.
Regards,
ap.

First of all its better to make a jsp rather than one HTML and a servlet but anyhow in order to deploy it first build your project and create a war file which should contain your HTML and servlet and the web.xml.
Then place this war file inside the webapps folder of tomcat.Start the tomcat and hit your HTML on the browser....

Similar Messages

  • Deploy servlet with WAR file

    Has anyone successfully deployed servlets using WAR file?I think I did everything right. The WAR file was deployed. But I can't accesss it.
              

    I use .war files for deploying servlets in WLS 6.0 - they are much easier
              than exploded dirs...
              Usually, when I have a problem accessing the servlet once deployed, it's
              almost always the deployment descriptor.
              "Randy" <[email protected]> wrote in message
              news:3b311258$[email protected]..
              > Has anyone successfully deployed servlets using WAR file?I think I did
              everything right. The WAR file was deployed. But I can't accesss it.
              

  • Where to place HTMl files in  tomcat while executing Servlets examples ?

    Hi,
    I'm learning servelets (HttpServlets). in that input is given through html files.now i dont know where to place that html file in apache tomcat server
    This is my Directry Structure
    Java's ---- C:\Program Files\Java\jdk1.5.0\bin
    Tomcat's--C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ThreeParams extends HttpServlet
    public void doGet(HttpServletRequest request,HttpServletResponse response)throws ServletException, IOException
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String title = "Reading Three Request Parameters";
    String docType ="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +"Transitional//EN\">\n";
    out.println(docType +"<HTML>\n" +"<HEAD><TITLE>" + title + "</TITLE></HEAD>\n" +"<BODY BGCOLOR=\"#FDF5E6\">\n" +"<H1 ALIGN=\"CENTER\">" + title + "</H1>\n" +"<UL>\n" +" <LI><B>param1</B>: "+ request.getParameter("param1") + "\n" +" <LI><B>param2</B>: "+ request.getParameter("param2") + "\n" +" <LI><B>param3</B>: "+ request.getParameter("param3") + "\n" +"</UL>\n" +"</BODY></HTML>");
    }HTML code ---
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML><HEAD><TITLE>Collecting Three Parameters</TITLE></HEAD>
    <BODY BGCOLOR="#FDF5E6">
    <H1 ALIGN="CENTER">Collecting Three Parameters</H1>
    <FORM ACTION="ACTION="C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\root\WEB-INF\classes.ThreeParams">
    First Parameter: <INPUT TYPE="TEXT" NAME="param1"><BR>
    Second Parameter: <INPUT TYPE="TEXT" NAME="param2"><BR>
    Third Parameter: <INPUT TYPE="TEXT" NAME="param3"><BR>
    <CENTER><INPUT TYPE="SUBMIT"></CENTER>
    </FORM>
    </BODY></HTML>
    {code}
    servlet code is compiling without any errors, now where should i place the class file and html file in tomcat to execute this program..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    webapps\yourapplicationname\WEB-INF\

  • Hot Deploy Servlet in JAR file problem

    I've been playing with hot deploying servlets in WLS 5.1. I have SP2
              installed. I have things working fine with individual servlet class files. I
              decided to try hot deploying with jar files.
              I created a servlet, added it to a jar file, and then added the jar file to
              the 'weblogic.http.servlet.classpath'. I then restarted the server. I
              started the console and was able to hot deploy the servlet. So far so good.
              My next test is what failed. I modified the servlet, and rebuilt the jar
              file. I went back to the console, selected the servlet and hit the redeploy
              button. I went back to the browser and hit refresh - nothing, still the old
              servlet.
              It appears that WLS isn't reloading the jar file and the updated servlet.
              Everything works with individual class files.
              Does anyone know how I can cause the reload of updated servlets embedded
              within a jar file?
              Weblogic group - If there is no way now, will support be added soon?
              Thanks,
              Rick
              

    Hi,
              If I use weblogic.servlet.ServletServlet to try just the servlet , It
              works correctly.But When I develop it in a web application , there is a lot
              of hypelink to this servlet,thus I can't use the relative path reference to
              that servlet.I try to set the name of weblogic.servlet.ServletServlet same
              as the webapp,It doesn't work,how do I solve this problem?
              Thank you
              Pan
              Subject: Re: Hot deploy Servlet in webapp
              > http://www.weblogic.com/docs51/classdocs/API_servlet.html#134798
              >
              > It even explains why you shouldn't use it in production environment.
              >
              > Dimitri
              

  • Deployment of static html files (for the documentation of the application)

    I'm developing with forms 11g for windows and deploying on linux.
    I want to deploy the help docs of my application, which I've already migrated from hlp to html / css.
    Now, I would like to know where can I deploy that html files to invoke them with web.showdocument (for example).
    To what path is relative the url in the web.showdocument built in?
    Can I jar them as I did with the icons?

    ok, thanks anyway,
    Maybe the problem is with my weblogic configuration, as it is a windows developer workstation.
    I'll send instructions to the sysadmin and try to do it in the linux deployment server.
    I've tried also with WLExcludePathOrMimeType , as read in the manual this
    Note:
    When including any user-defined aliasMatch with the prefix /forms/ in forms.conf, add the directiveWLExcludePathOrMimeType. For example, in Linux, when defining the aliasMatch for /forms/usericons in forms.conf, the directive WLExcludePathOrMimeType is defined as following:
    AliasMatch /forms/usericons/(..*) "/home/userx/myicons/$1" WLExcludePathOrMimeType /forms/usericons/

  • Which is the servlet configuration XML file in tomcat

    Which/where is the servlet configuration file in Tomcat?
    Do we need to modify this anytime?

    You configure tomcat itself using the server.xml file in the conf folder, but there are many other xml files that can be modified, which can have an affect on your servlets or jsps.
    I think you may be talking about the web.xml file which resides in your WEB-INF folder of your webapp (defined by your context tags in server.xml). Don't confuse this with the web.xml file that sits in the servers conf folder.
    Search for web.xml to get details of what you can put in here. There are plenty of examples across the internet.

  • Help with html files when placing Web Content overlay

    Hi there,
    We have an educational app with lots of interactive exercises - all of which were initially designed in Flash.
    I have converted the fla files into hmtl using Wallaby. For each fla file, Wallaby creates a js, css and html file as well as an assets folder.
    When I place the Web Content frame, and link it to the html file, do I link it to the actual html file Wallaby created? It won't let me select the folder with all of the files in it as is, and I can't link it to a zip file either... So how does it recognise the assets if I only select the html file? (see screenshot)
    Or do I need to add an HTMLResources folder and link it to that?
    Thanks in advance for any help given.

    You link to the HTML file but make sure these things are in their own folder or InDesign will add EVERYTHING in the folder that has the html file in it.
    Bob

  • The DPS continues to NOT work with html files

    Hi Adobe guys...i try the last 2 days to upload one white page with one html file (1MB)...the procedure fails all time...I see the "Error During Download" message. And the server seems to produce abnormal big files (156 of 417 MB)....
    The other 2 projects was produced before your DPS update and contains multiple html files....Any reason for this? Thanks

    This isn't a DPS support site, but rather a community forum. You should contact Adobe via your support agreement if you're looking for technical assistance.
    The issue sounds related to how you're trying to use HTML files. We have HTML articles every month and don't have any issues.
    My only thought is that the folder you're selecting to include when you import your HTML articles has lots of extra data in it, which is bloating the size of the folio.

  • Servlet with HTML using JDBC lookup

              Dear Friends
              How are you?
              I am designing a servlet with two drop down lists one on top and the other below.
              I implemented drop down lists using dynamic embedded HTML and SELECT tags.
              I want the user to make a selection in the first drop down list, and the second
              drop down list should display a list based on the selection made in the first
              drop down list.
              Please comment in detail on the most efficient way of achieving this.
              Thanking you
              Very truly yours
              Sriram (Ram) Peddibhotla, PhD
              

    For this I'd probably load all the values for both drop down list and use
              javascript.
              Tinou Bao
              www.tinou.com
              "Sriram (Ram) Peddibhotla" <[email protected]> wrote in message
              news:3b181cd0$[email protected]..
              >
              > Dear Friends
              >
              > How are you?
              >
              > I am designing a servlet with two drop down lists one on top and the other
              below.
              > I implemented drop down lists using dynamic embedded HTML and SELECT tags.
              >
              > I want the user to make a selection in the first drop down list, and the
              second
              > drop down list should display a list based on the selection made in the
              first
              > drop down list.
              >
              > Please comment in detail on the most efficient way of achieving this.
              >
              > Thanking you
              > Very truly yours
              > Sriram (Ram) Peddibhotla, PhD
              

  • Response of a servlet -- a html file

    does anyone know how to do this...
    after processing the clinet request, servlet will return a path of html file that will open in the clinet side..
    if possible tell me the way to do it without jsp bcoz i don't know jsp.

    i have not tried what u have said..anyway thanks.but i have done it another way.and its working fine also..
    out.println("<SCRIPT>window.location.href=\"/redirect.html\" </SCRIPT>");
    piyush

  • Does lightbox work with html files (or only png, jpeg, other image files)?

    The following image is not displaying in lightbox when I click on the thumb:
    <a href="images/example.html"
    But it does appear when I don't allow Active X.
    Is there something i need to change for lightbox to accept html files?
    Thanks!
    Ken D

    AFAIK, Lokesh Dhakar's Lightbox scripts only work with web images (PNG, GIF, JPG).
    For other modal window systems that DO support multiple file types -- including HTML, Media, Ajax and iframes, see links below.
    FloatBox
    http://floatboxjs.com/demo
    HighSlide
    http://highslide.com/
    PrettyPhoto Lightbox Clone
    http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/
    FancyBox
    http://fancybox.net/
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Showing DPS functionality with HTML file?

    Hello,
    I am mocking up a website using InDesign, and I have indicated the interactivity using DPS (buttons, scrolls, MSOs, etc). I'm wondering if there's a way I can export an HTML file that will show all the functionality? If not HTML, is there another file format that I could save, that is not a .folio? I want to be able to email a file to people who do not have InDesign or the Adobe Content Viewer.

    No to both. If you want to preview this content with someone they need to install Adobe Content Viewer and then you can share the folio with them for review.
    Neil

  • URL iview with HTML file located in Portal server.

    I created URL iview pointing to HTML file located in the Portal server. When I try preview it is not working. We wanted to use this iview to create space between two iviews.
    This is going to be blank iview.
    I saved the HTML file same as where index.html file of webas is located.
    Please let me know what is missing here. What kind of path I need to give in the URL of the iview.

    Hi Nagesh,
    Are you saying that you created a HTML file on the file system of the portal server or did you create the HTML file within a KM repository on the portal?
    If it is the 1st option you should have the HTML file hosted under a webserver such as IIS or Apache and then use the URL that the website is created under.
    If it is a file within KM then open the properties of the HTML document that you have created and use the Access Link value as the URL for the iView.
    Please let me know if you need further clarification.
    Regards
    Daniel

  • Cannot upload application with HTML files

    <loader version="1.0">
    <application id="GuideBook">
    <name>GuideBook</name>
    <description>Know your rights</description>
    <version >1.0</version>
    <vendor></vendor>
    <copyright>Copyright (c) 2009</copyright>
    <fileset Java="1.0">
    <directory>D:\Projects\Blackberry\SampleApplications\phonegap\</directory>
    <files>GuideBook.cod</files>
    </fileset>
    </application>
    </loader>
     Try to upload application on device Blackbarry 7100, but allways get error   
      "The application GuideBook cannot ge loaded because some required files are not available." 
    But D:\Projects\Blackberry\SampleApplications\phonegap\GuideBook.cod exists ! Yes, my application uses HTML files, maybe i need to add them also?

    Thanks for your fast reply. My fast answer is:
    Strange things
    1. I tried to connect to htmldb as you asked me. It was OK from localhost and remote computer, too.
    2. WEB folder experimenting wasn't successful from local computer again, BUT IT WAS SUCCESSFUL (via XDB login) FROM REMOTE COMPUTER. (I haven't tried it yet before...)
    I have read the information you wrote about DAD some days ago, and I found it valuable. The only different thing in XE (after you restore the pls dad) is the user.package.procedure calling INSIDE the package, which - as I understand - is a new thing. Eg. calling from one procedure from the other in package test in 9i was simple: test.procedure1. But now you HAVE TO put username at the beginning of the calling, like: hr.test.procedure1 which means that you can compile the old package without error, however you cannot use the procedure calling inside the package. That is the reason I had to change them. Another new thing, that if you want to share your http package, that you have to add an execute grant on it to public. So there are some differences, not big, nevertheless important changing.
    After this long dissertation, my question is still how can I reach an image folder from my package. Now I can reach the WEB folder from an old NT4 machine, so I can upload and download images, making folders, etc. But how can I reference them? (Anyway I do not now the reason, why I cannot reach WEB folder from the local computer...)
    Sorry for the long long long spiel. Waiting for your answer.
    Zsolt

  • Invoke .html file in tomcat 4

    I am newbie to servlet and I am trying some simple example of servlet in
    which I have written
    1) a html form to get data saved in webapps/myplace/
    2) a servlet which is to return the data got from the request.get of the
    html form.
    I have deployed the tomcat server, put the compiled servlet class in the
    WEB-INF/classes and also make the web.xml file.
    However, when I load the page to the servlet from the html form, and click
    submit from the form which is supposed to link to the servlet, it returns
    404 error which said it cannot load the page.
    I would like to know what I have missed that lead to such problem.
    Thousands Thanks

    do you have the URLs right, are there any port numbers that needed to be included ?
    i.e. http:\\www.mywebserver:1234\MyWebPages

Maybe you are looking for

  • How get all record from master and matching record from detail

    hi master sir i have master detail table i have many record in master table but some record in detail table how i get all record from master and matching record from detail such as select m.accid,m.title,d.dr,d.cr from master m, detail d where m.acci

  • Shipment Cost - ERS (Evaluated receipt settlement)

    Hi, We are using Shipment cost documents to calculate the customer freight. In shipment cost document, we need to transfer the amount to accounting. In that case system will create PO automatically. This is all good. Now, We need to activate ERS for

  • How do I make Firefox OPEN in Full Screen?

    I know how to change browser size, but how do I get Firefox to open in a large window, instead of a 2 inch space I have make larger, manually?

  • How do I get my iphone off video and back to camera mode?

    My camera is stuck on video and I can't get it to switch back to camera.

  • Effect Question for PR

    How can I open a scene like this in PR?  Thanks for any help you can give me!!!!!!!!!! Lil Durk f/ Migos & Cashout - Lil Niggaz (Official Video) Shot By @AZaeProduction - YouTube Checkout what I am asking about from 17-42 seconds into the video and t