![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Web Programming, Web 2.0 and Mashups Discuss Web Programming and Web Server Administration, including LAMP, Apache, MySQL, Flash, HTML, SEO, Mashups and other Web APIs and topics. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| converting a tabular format data to comma seperated data in KSH | Hemamalini | UNIX for Dummies Questions & Answers | 2 | 06-16-2008 05:37 AM |
| pass curls progress/status data to a file | scarfake | Shell Programming and Scripting | 0 | 05-31-2008 05:23 PM |
| how to verify that copied data to remote system is identical with local data. | ynilesh | Shell Programming and Scripting | 3 | 01-31-2008 08:55 AM |
| Howto capture data from rs232port andpull data into oracle database-9i automatically | boss | UNIX for Dummies Questions & Answers | 1 | 09-23-2007 03:35 AM |
| pf not working properly even with only "pass in all" and "pass out all" rules | xyyz | UNIX for Advanced & Expert Users | 4 | 12-30-2003 05:33 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
how to pass data in webrick sevelts? please help
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 servlet and print it out... this is what i worte... can anyone please help me with this. s = HTTPServer.new( :Port => 9000) class TextServlet < HTTPServlet::AbstractServlet def do_GET(req, res) res.body = %Q{<html> <form action = "text.rb"> Name:<input type = "text" name = "text1"> <input type = "submit"> </form> </html>} res['Content-Type'] = "text/html" end end class Dataread < HTTPServlet::AbstractServlet def do_GET(req,res) res.body = %Q{<html> <body> Welcome <I dont know how to call it here> </body> </html>} res['Content-Type'] = 'text/html' end end trap("INT") {s.shutdown} s.mount("/" , TextServlet) s.mount("/text.rb", Dataread) s.start I am a total beginner to this , so please help me out.... Also if there is any resource online available do point me to it, apart from webrick.org |
![]() |
| Bookmarks |
| Tags |
| unresolved, unresolved for months, unresolved for weeks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|