• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

HTML, forms, and Java.

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi. I'll try to explain this as best I can. I'm wondering if/how I could create a simple webpage with a form on it, such as a simple HTML radio checkbox with the following attributes: checkbox#, Cost, Shipping... (Emulating a SIMPLE form for an online order *adder-upper*) The submit button for the form would send a request to a java [class?] file in the same diretory (much like some webpages use javascript as simple as.. <script action= javascript.js> or something). Then the java program would accept the input from the HTML url (those said attributes), process it (ie.. add up the values) and output it to a variable, which is then displayed in a new webpage. You get it? heh..
Although this seems simple to me.. I'm asking if it can be done (as simple as I'm envisioning the theory), And if you think you understand what I'm talking about, a topic or link to point me into the right direction of learning. Thanks for the help.
Like CGI, but in java.
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is very simple if you understand servlets. However, in my opinion, servlets are not so simple for beginners. Here is a page that will give you some idea about the subject.
 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Will most places one might have free space for personal www pages allow you to put servlets on their server?
 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Robbie,
What you want is a servlet. Check the Servlets forum here at the ranch. As was previously mentioned, most free web hosting places do not support servlets. There is one that I'm familiar with - MyCGIServer (It's slightly misnamed as they no longer support CGI).
Good luck. Post in the servlet forum if you have problems getting started.
 
On my planet I'm considered quite beautiful. Thanks to the poetry in this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic