02-18-2009
issues regarding <frameset> usage in webrick servlets, pls help
Hi all,
Ive been trying to execute <frameset> tags within webrick servlets..
But when the server is started i get erreneous o/p ... The html code if executed individually runs flawlesswelly but inside the servlet it cribs...
Could anyone please help me out?
Quote:
#!/usr/bin/ruby -w
require 'webrick'
include WEBrick
s = HTTPServer.new(:Port => 9000)
class Test < HTTPServlet::AbstractServlet
def do_GET(req,res)
res['Content-Type'] = 'text/html'
res.body = test
end
def test
html ="<html"
html +="<frameset cols='30%, 80%'>"
html +="<frame src='contents_of_frame1'> "
html +="<frame src='contents_of_frame2.gif'>"
html +="</frameset></html>"
end
end
trap("INT") {s.shutdown}
s.mount('/', Test)
s.start
9 More Discussions You Might Find Interesting
1. Programming
how can i monitor usages of CPU, Memory, Hard disk etc. under SUN Solaries
through a c program or java program
i want to store that data into database so i can show it graphically
thanks in advance (2 Replies)
Discussion started by: Gajanad Bihani
2 Replies
2. HP-UX
how can I find cpu usage memory usage swap usage and
I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times
my final destination is monitor process
logical volume usage above X % and number of Logical voluage above
can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies
3. Solaris
Hi,
I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP.
I want the oids for above tasks.
can you please tell me that
Thank you (2 Replies)
Discussion started by: S_venkatesh
2 Replies
4. Web Development
Hi all,
I am a newbie to servlet programming using webrick...
Was wondering how to accept data from a form and do necessary
processing..
To start with i wrote a sample servlet that accepts a name and prints
"welcome <name>"
But I do not know how to take this value from the form into the... (0 Replies)
Discussion started by: wrapster
0 Replies
5. AIX
How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies
6. Shell Programming and Scripting
Hi everyone,
I am just wondering, is there any way to do something like put text on line 1 of the terminal window and then set the window's display to start at line 2, so that the text in line 1 is always on the screen?
-patrick (1 Reply)
Discussion started by: patrick99e99
1 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
Can you please tell me the command, with which one can know the amount of space a specific directory has used.
df -k . ---> Displays, the amount of space allocated, and used for a directory.
du -k <dir name> - gives me the memory used of all the files inside <dir>
But i... (2 Replies)
Discussion started by: abhisheksunkari
2 Replies
8. UNIX for Dummies Questions & Answers
Let's say i have 20 users logged on Server. How can I know how much memory percent used each of them is using with system time in each user? (2 Replies)
Discussion started by: roy1912
2 Replies
9. Web Development
Good afternoon:
I need your help please:
Im new at web applications and i started taking a Ruby on Rails course and as a part of the installations i followed the instructions given on page:
http://railsapps.github.io/installrubyonrails-ubuntu.html
I followed every step and id did not yield... (6 Replies)
Discussion started by: alexcol
6 Replies
LEARN ABOUT DEBIAN
camping
CAMPING(1) User Commands CAMPING(1)
NAME
camping - small Ruby web framework for MVC type applications
SYNOPSIS
camping app1.rb app2.rb...
DESCRIPTION
Camping is a web framework which consistently stays at less than 4kb of code. The idea here is to store a complete fledgling web applica-
tion (written in Ruby) in a single file like many small CGIs, but to organize it as a Model-View-Controller application like Rails does.
You can then easily move it to Rails once you've got it going.
Specific options:
-h, --host HOSTNAME
Host for web server to bind to (default is all IPs)
-p, --port NUM
Port for web server (defaults to 3301)
-d, --database FILE
SQLite3 database path (defaults to ~/.camping.db)
-C, --console
Run in console mode with IRB
-s, --server NAME
Server to force (mongrel, webrick, console)
Common options:
-?, --help
Show this message
-v, --version
Show version
FILES
~/.camping.db
The default database file.
SEE ALSO
The Camping website on http://camping.rubyforge.org/.
AUTHOR
This manual page was written by Paul van Tilburg <paulvt@debian.org>, for the Debian GNU/Linux system (but may be used by others).
camping 2.0 May 2010 CAMPING(1)