Problem in Server side includes using Tomcat

Problem in Server side includes using Tomcat:
I am trying out small programs in servlet.
I get one example program for server side includes from net.
The code is:
<HTML>
<HEAD><TITLE>Times!</TITLE></HEAD>
<BODY>
<P>
The current time in London is!!! :
<SERVLET CODE="CurrentTime" codebase="../servlet">
<PARAM NAME="zone" VALUE="GMT">
</SERVLET>
</P>
</BODY>
</HTML>
I placed this test.shtml file in tomcat-home/webapps/ROOT folder and i kept the servlet in WEB-INF/classes folder.
I renamed the servlets-ssi.jar and i removed the comments for SSI in web.xml file.
When i run the servlet separately, i am getting the correct result. But if i run shtml file with the URL : http://localhost:8080/Test.shtml,
i am getting the result as:
The current time in London is!!! :
It is not invoking servlet program.
CAN ANYONE HELP ON THIS!
Thanks.

Thanks...as u said I tried putting dir & found that
my file was saved as Ch1Servlet.java.txt instead for
Ch1Servlet.java......So that was a problem.Now I'm
able to compile.Oh, yeah. Notepad will do that to you. I think when you save in Notepad if you put quotes around the name "Whatever.java" then it won't add the .txt.
But on compiling I'm getting the following error
package java.servlet.* does not exist
package java.servlet.http.* does not exist
package java.io.* does not exist
Do u the reason for this??? The servlet stuff is java[b]x.servlet. For the io stuff, I don't know, I'd have to see your code. Either you have a typo or a corrupt installation.

Similar Messages

  • Trouble Testing Server Side Includes using personal web sharing

    I am using the book "Standard complant websites using dreamweaver 8" One of the exercises has me testing that server side includes are enabled by creating two files ssi_test.shtml and hello.html. I have placed these two files in the documents subfolder which web server is the main folder.
    Since I only see a blank page when I test, the book says I need to tweak the Apache configuration to enable SSI. It says to open httpd.conf file (which I can not find) . I am suppose to insert the following lines: AddType text/html .shtml and Addhandler server-parsed .shtml
    Where is this file httpd.conf file located?
    How do I modify it?
    Thanks for your support
    James
    powermac G4 Mac OS X (10.3.9)

    It is in /private/etc/httpd directory.
    You will need a file editor that knows how to authenticate or to learn some basics with the command line and unix to use sudo to edit the file.
    <pre>sudo pico /private/etc/httpd/httpd.conf</pre> is where I recommend you start if you don't know emacs or vi or another of the fine unix editing tools that are provided...
    An article that was intended to fix a different problem - but has all the steps you need to locate the terminal application, learn about sudo, etc... is http://docs.info.apple.com/article.html?artnum=301580

  • Problem with server side includes

    Hi - I have a page with two php includes which no longer display properly. They were fine when I set them up, and I haven't changed anything.  They don't display online - and also don't display on my local server (Apache).  I have identical code on other sites which does display properly, both on my server and online.  There's nothing wrong with the file paths as they display correctly on the DW display screen, and also on live display, so I'm completely baffled.
    Can anyone shed any light?
    Here's a sample page - http://www.lucidinsight.com/travelprev.shtml
    The includes should both be displaying on the right side of the page (hence the two error messages)
    Thanks!

    Hi...contrary to all logic and expectations, shtml pages DO process php includes.  I appreciate that this seems very strange but I have several examples on my sites, with identical code to that already posted, and they work.  I have to use a .php file extension rather than .asp as this is required for the file to be read by an online CMS site - rather than change the page to a php file and have to amend the site navigation, I have gone with just changing the file extension.  This works for every single one of my sites except this one, and I can't see why, hence this question...
    SW

  • Server-side includes in cs5

    have used all previous versions of dw. no prior problem with server-side includes. now, they are not showing up in design view. Yes, I have marked preferences to include hidden items/server side includes. any thoughts anyone?

    I set up a static test site.  It has no testing server defined - just a local site.  In that site I have two files -
    1.  include-test.html
    2.  /_inc/test.html
    Their contents are -
    INCLUDE-TEST.SHTML
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    </head>
    <body>
    <p>This is a test of SSI.  The following paragraph is an HTML include -</p>
    <!--#include file="_inc/test.html" -->
    </body>
    </html>
    TEST.HTML
    <p>Ut aliquip ex ea commodo consequat. Duis aute irure dolor eu fugiat nulla pariatur. Sunt in culpa ullamco laboris nisi quis nostrud exercitation.</p>
    When I look at Design view for include-test.html, I can see the contents of the include file, and I can see it listed as a related file below the filename tabs:
    So, I'm at a loss....

  • Tabbed with Server Side Include

    Has anyone had any problems adding Server Side Include to the Spry Tabbed Pannels, everytime the I add a SSI to the tabbed content is locks up the tabs.
    Where the hell are to get support is this an interAKT, ADOBE or your on your own.

    Hello,
    I don't have an answer to your problem, because I've never tried this approach.
    However, I can tell you that this is an USER-TO-USER forum. If you need to request technical support from Adobe, you need to go here:
    http://www.adobe.com/go/support/
    regards,
    Ionut

  • TOMCAT - Enable Server Side Includes

    Hi, i tried to include files in my pages using <!--#include file="file_name"--> but its not working so i suppose i must configure my tomcat in some way in order to enable the server side includes (im tottaly new to TOMCAT) so, anyone can explain me how to do it?
    Thx!

    Hi, i tried to use the tag like this:
    <jsp:include page="../menu.jsp" flush="true" />
    But it did not work.. why?
    id did something like this:
    <% jsp code %>
    <html>
    <head>
    </head>
    <body>
    <jsp:include page="../menu.jsp" flush="true" />
    some content
    </body>
    is there any special use?
    thX!

  • Server side include problem in DW design mode

    I am having issues with one computer out of three...Using DW
    8 on Mac OS 10.4 Intel....
    I have a server-side include set up to contain my navigation
    (nav.shtml) inside of a DW template, and normally, the editable
    regions can be worked in and the SSI area comes up blank until the
    file is uploaded to the server (which is OK...).
    On the third computer, however, the SSI area is actually
    visible in DW, but the Editable Region containing the main content
    area doesn't even show up, therefore we cannot work on web pages on
    that computer. I know this must be a setting having to do with
    using DW and a Mac as a web server, but I cannot find it! Anyone
    have any clues?
    Thanks so much!

    Can you describe teh details of the problem, please?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Phil Cornish" <[email protected]> wrote in
    message
    news:g8eosb$ijq$[email protected]..
    >I have this same problem on a Win XP
    machine...HELP!!!!!!!!!!

  • Are Server-Side Includes in Dreamweaver ok to use?

    Hi, I'm considering using the built-in feature, 'Server-Side Includes' in Dreamweaver CS3. Can anyone tell me if this is ok to use, or is there a better way of approaching this process?
    Many thanks in advance!

    Yes, server-side includes are an excellent feature. Just make sure that your server supports them. On many servers, you need to change the file name extension from .html to .shtml.
    The other thing to remember is that a server-side include should just be a fragment of a page. It should not include a DOCTYPE declaration or duplicate <html>, <head>, or <body> tags.

  • What language should I use if I am a beginner to using SSI (server side includes)?

    I want to start using server side includes and understand how to also code them by hand.  What is the easiest way to begin?  Do I just php?
    -Kate

    First question you need to ask your Host is if they support server-side includes and which document extensions you can use.
    Common extensions:
    .shtml, .shtm, .php, .asp, .cf.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics |  Print | Media Specialists
    www.alt-web.com/
    www.twitter.com/altweb

  • Spry accordion widget - SSI (server side include) as content in the panel

    After having inserted the following command <!--# include file = "content2.asp" -> in the accordion Panel Content I get an error in Dreamweaver - every time I open the file. See the error in the attached picture.
    Once all files are uploaded to the server it works apparently without problems or script errors.
    Is there anyone who can help me to use SSI "server side include" as content in accordion panels?

    Thanks for your reply.
    The fault lay in the SSI file. This file contained these tag:
    </ html>
    And of course the tag </ html> generate an error if the tag is inserted in the content of the accordion panel via ssi file.

  • Server side includes: outdated and not supported by host?

    I've been using SSI's for ages with no problem from any host. Recently I signed up with a new web hosting company, one of the more established ones in the Seattle area. They do not support SSI's and claim that using them is not safe and is not a modern approach to web design. They suggested I use a more advanced programming language to create my sites, such as ASP.NET (something I have no desire to do).
    Are server side includes outdated and no longer the way to do things? I find that hard to believe.
    -Jesse

    Are server side includes outdated and no longer the way to do things? I find that hard to believe.
    That language is from Microsoft who seem to think so along with Windows based hosting providers offering ASP.NET.
    IIS no longer comes with SSI installed by default. It has to be configured by the hosting provider.
    http://blogs.iis.net/robert_mcmurray/archive/2010/12/28/iis-notes-on-server-side-includes- ssi-syntax-kb-203064-revisited.aspx
    However, classic SSIs (in the sense of including static content from one page inside another) are still one of the most powerful, safe and flexible tools for managing repetitive page elements in any web page. Not to mention easy.
    ASP.NET has its own way of doing the equivalent of SSIs - and lots more beside but much of which does not interest web designers at this stage.
    http://stackoverflow.com/questions/894720/asp-net-equivalent-of-server-side-includes
    http://searchsoftwarequality.techtarget.com/answer/Alternatives-to-server-side-includes-fo r-ASPNET

  • Server-side includes not showing in new DW CS5.5. Any suggestions?

    I have used DW for years and years and have never had any problems. I just installed CS5.5 and am not seeing my php includes in the design pane. I've searched the forums but have not found a working answer.
    I'm editing files I've edited in CS5 and earlier with no problem.
    I've checked the server-side includes box in the configuration but no change occurs.
    Does anyone have any suggestions?

    What testing server setup do you have? Are you using something like WAMP?
    What do you see on screen which tells you the SSIs are not rendering? Any error message?

  • Server-Side Includes in weblogic server 5.1

              Hi,
              I tried Server-Side Includes examples in weblogic server 5.1 thru .shtml file.
              I am able to load the .shtml file but its not loading the included servlet. But
              I am able to load the included servlet alone separately.
              Somebody can be assist me what I have to do?
              I am using WebApplication WAR structure for my application.
              ex: http://localhost:7001/esp/hellooWorld -- loading the servlet
              http://localhost:7001/esp/html/ServletInclude.shtml -- not loading servlet
              where 'esp' name of the WebApplication
              The .shtml file code is given below
              <html>
              <body>
              <servlet name=hellooWorld>
              </servlet>
              </body>
              </html>
              Looking forward for some help
              Thanks
              

              Your WebLogic doesn't know it's supposed to be doing server-side includes. Make
              sure you have .shtml registered/enabled - see the docs.
              Mike
              "Jyothi" <[email protected]> wrote:
              >
              >Hi Mike,
              >Thanks for your reply.
              >>What errors (if any) do you see in the log file?
              >Just coming up with blank screen. No errors reported in log file. Nothing
              >coming
              >in log file regarding the servlet.
              >>
              >>When you display the page in a browser, what does View -> Source show?
              >Just getting blank screen. If I see view source same source code coming
              >up. Here
              >is the view source when I view it from browser
              >**********************************************
              ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
              ><html>
              ><head>
              ><title>Including a servlet with SSI</title>
              ></head>
              >
              ><body
              > bgcolor="#FFFFFF"
              > link=#DB1260
              > vlink=#828282>
              >
              ><font face="Helvetica">
              >
              >
              ><p>
              ><servlet name=hellooWorld>
              ></servlet>
              >
              ></font>
              ></body>
              ></html>
              >*********************************************************
              >>Did you register the servlet?
              >Yes. I registered the servlet. Thats why if I load the servlet alone
              >I am getting
              >the output.
              >http://localhost:7001/esp/hellooWorld -> url used to load servlet alone
              >>
              >I hope this info helps to you to analyze my problem
              >
              >Thanks
              >Jyothi
              >>
              >>"Jyothi" <[email protected]> wrote:
              >>>
              >>>Hi,
              >>>I tried Server-Side Includes examples in weblogic server 5.1 thru .shtml
              >>>file.
              >>>I am able to load the .shtml file but its not loading the included
              >servlet.
              >>>But
              >>>I am able to load the included servlet alone separately.
              >>>Somebody can be assist me what I have to do?
              >>>I am using WebApplication WAR structure for my application.
              >>>ex: http://localhost:7001/esp/hellooWorld -- loading the servlet
              >>>http://localhost:7001/esp/html/ServletInclude.shtml -- not loading
              >servlet
              >>>
              >>>where 'esp' name of the WebApplication
              >>>
              >>>The .shtml file code is given below
              >>>-----------------------------------
              >>><html>
              >>><body>
              >>><servlet name=hellooWorld>
              >>></servlet>
              >>></body>
              >>></html>
              >>>--------------------------------------------------
              >>>
              >>>Looking forward for some help
              >>>
              >>>Thanks
              >>>
              >>>
              >>>
              >>>
              >>>
              >>
              >
              

  • Server-side includes in css

    I am trying to incorporate server-side includes for my nav.
    links. I created the website using css. I am able to preview the
    navigationals (with proper links when I hovered) with F12 iexlorer,
    but when I upload everything and view it from IE, Mozilla, etc.
    they aren't there. My left nav. is totally blank.
    I am very new to web making and learned what I could from
    internet sites. Here are examples of my ssi code:
    My index page has a php extension (index.php) and has this
    inserted for the include:
    <?php include("menu.html");?>
    menu.html looks like:
    <ul>
    <li><a href="index.php">Home</a></li>
    <li><a href="searchplans.php">Search Plans
    </a></li>
    <li><a href="modifydesign.php">Modify
    Design</a></li>
    <li><a href="designpricing.php">Design
    Pricing</a></li>
    <li><a href="purchaseplan.php">Purchase
    Plan</a></li>
    <li><a href="contactus.php">Contact
    Us</a></li>
    </ul>
    I know that my server supports ssi, because I previously
    created a very basic site (not using css) using shtm extensions and
    an includes folder. When I called them they said that they support
    php too, but thought it was a problem with my settings in
    Dreamweaver.
    If you have any advice, I would be very grateful. I am
    banging my head on this one.

    Be sure to upload menu.html to your server.
    HTH,
    Randy
    > <?php include("menu.html");?>

  • Display Server Side Include at top of scrollable Div

    Hello,
    In this topic, I will be referring to the following containers on my page:
    DIV A:  Contains the content of the page; this div has overflow set to scroll.
    DIV B: Contains the links
    DIV A contains 3 different server side includes, each with a different ID. Using the Show/Hide Element, I have set it so that when a link in Div B is clicked, the appropriate server side include is displayed in DIV A, and the other two server side includes are set to hide.
    The only problem is that when their appropriate links are clicked, SSI 2 and SSI 3 do not appear at the top of DIV A, but at the position they would be if all SSIs were set to show, so the user has to scroll to see SSI and SS 2.
    Do you folks know of any way to have the SSI display at the top of DIV A?
    It occurred to me that instead of using Show/Hide behavior, I may need to somehow include an SSI only when a DIV B link is clicked, and when a different DIV B link is clicked, that SSI is stripped form the page and the appropriate SSI is included.Is that even possible?
    Does this make sense to all of you?
    Thanks,
    Mike

    Without seeing your code, it could be how you are positioning these elements on your page.  If you plan on showing/hiding layers you will need to position these layers to show in the same spot every time by setting the position of DIV A to relative and the position of the 3 layers inside to absolute with a top and left value set to 0.

Maybe you are looking for

  • How to install windows 7 on Mac OS 10.9

    Hi, all, I recently purchased a Macbook pro 13 with Retina display, it has MacOS 10.9 on board, but I have some work need be done on Windows, so I have to install Windows7, meaning that I will have a dual boot on my Macbook. I did a bit research on h

  • Sales Order Change

    Hi All, I am creating sales order and the route information is coming form many external systems through an IDOC, IDOC is having the Route information but it does not have the shipping conditions information. Based on the route I need to populate the

  • How can I get my iPod to shuffle the songs far more?

    Hi there, On my mate's PC where she has an older version of iTunes, she has the option under 'Preferences' where she can set the shuffle to less likely, normal or more likely. As a result, she's now hearing tunes that she hasn't heard in ages. I trie

  • Pre Populate AD UserPrincipalName with multiple IT Resources and 1 form - 11g r2

    I have an ICF AD connector with 3 IT resources, each one having a different domain (i.e. example.us.com, users.eu.com....). I only have 1 resource form though. When I prepopulate the UPN field, I have to do userlogin@domainame. When I go to map the v

  • Light gray image border

    I am encountering an issue I have never had before in Photoshop.  I am trying to create a background image for a website, and Photoshop keeps putting a 1px light gray border around my image, even though I have not placed a border on the image.  It's