NYCPHP Meetup

NYPHP.org

[nycphp-talk] talk Digest, Vol 37, Issue 15

tuon1 at netzero.net tuon1 at netzero.net
Sun Nov 22 00:00:51 EST 2009


Hi Ain,
I don't know  if you're familar with Java Servlet--it's a new and improved technology designed to
do the task (both front-end and back-end) that you're trying to accomplish.
There is a book that touches briefly on the this topic, the Servlet tutorial, which is found at
http://www.ZeroNilZilch.Com
It's called "The Introduction To Java" and the Servlet tutorial is in chapter 11.
Here is a brief snipet of a Servlet code that does both front-end and back-end job:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class ExampServlet extends HttpServlet 
      {
        public void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException
               {
                response.setContentType("text/html");
                PrintWriter out = response.getWriter();
               out.println("Example ";);
              String postData = request.getParameter("inputfieldname");
              if (postData != null)
                {
                 out.println(postData); //output the posted data
                }
           else 
               {
                out.println("No posted data was received from the input form.");
              }
          //You can do front-end as the following code shows:
         out.println('Return to <;A HREF="http://www.example.com/MainPage.html"  ');
         out.close();
       }
 }

Hope it helps a bit.
Paul

>Hello Guys:
>I am hoping that I can get a direction to take on this issue.? I have designed a back-end >program using Java.?? The purpose of this program is to be used as an inventory of items in >the home or small office.? I could use PHP embeded into HTML, but then I would have to >make it a part of the browser, which is not my intension (at least i think ).
I am using Java because of its cross platform capability.
>The issue is, can anyone direct me on a interface to use that would serve as a front-end for >this program.
>I have never done front end programming before that was not related to a database so I am a >bit at a lost? as to how or where to begin.
>Thanks in advance
>Ian

____________________________________________________________
Online Associates Degrees
Connect to AS and AA degrees from leading online universities today!
http://thirdpartyoffers.netzero.net/TGL2231/c?cp=sRcH1i5ja9MbLt9cKwxI9wAAJz5mrIdbwC4fSXas_5S9CdltAAQAAAAFAAAAANEiWz4AAAMlAAAAAAAAAAAAAAAAAABSJQAAAAA=
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20091122/003e1fdb/attachment.html>


More information about the talk mailing list