Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

not able to get the servlet output

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After setting up the tomcat 5.5 path with eclipse and running html .. m not able to get the output..
My html code is
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">;
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>simple web application</title>
</head>
<body>
simple web application hello
</body>
</html>


But after running on server the url
http://localhost:8080/SimpleServeletProject/
and the PAGE IT IS SHOWING IS (is attached)

<html>
<head>
<title>Directory Listing For /</title>
<STYLE><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></STYLE> </head>
<body><h1>Directory Listing For /</h1><HR size="1" noshade="noshade"><table width="100%" cellspacing="0" cellpadding="5" align="center">
<tr>
<td align="left"><font size="+1"><strong>Filename</strong></font></td>
<td align="center"><font size="+1"><strong>Size</strong></font></td>
<td align="right"><font size="+1"><strong>Last Modified</strong></font></td>
</tr></table>
<HR size="1" noshade="noshade"><h3>Apache Tomcat/5.5.9</h3></body>
</html>


Actually i have seen the servlet tutorial mentioned below but still don't know where the page is linked.
http://javabrains.koushik.org/p/jsps-and-servlets.html

apache.JPG
[Thumbnail for apache.JPG]
 
Greenhorn
Posts: 25
Netbeans IDE Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

amit cha wrote:After setting up the tomcat 5.5 path with eclipse and running html .. m not able to get the output..



did you configure your web.xml ?
 
Greenhorn
Posts: 18
Netbeans IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi amit, Where did you place your html file.

Open your browser and try this : http://localhost:8080/SimpleServeletProject/<htmlfile-name>.html
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its a plain jsp page and how can you expect a servlet output from a jsp page. ???

 
Well THAT's new! Comfort me, reliable tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic