Click to See Complete Forum and Search --> : Forms in Java


Bobby01
03-17-2008, 05:56 AM
Can anyone advise me on whether the best way to create Forms using Java, is going down the route of using Servlets?
I have just finished studying and now tackling a new project, that requires me to build a form, which takes user input and once submitted, creates a new form with the user input.
If anybody can guide me on the most suitable path to tackle this, I would greatly appreciate it.

chazzy
03-17-2008, 09:00 AM
I would say to try one of the main frameworks out there that simplify the approach greatly - such as using Struts or JSF.

Bobby01
03-18-2008, 03:10 AM
thanks for that.... I wasn't too sure, if I was doing the right thing.

Bobby01
03-18-2008, 04:55 AM
I haven't dealt with JSF & Struts, in the past, as I did an online course which taught me the basic theory and did not touck on JSF or Struts.
Could anybody suggest a good tutorial page or any guidance that would assist in creating an application, using either JSF or Struts?

chazzy
03-18-2008, 08:57 AM
There's http://jsftutorials.net/ and http://www.strutskickstart.com/

Bobby01
03-18-2008, 09:00 AM
Thanks for being so helpful.
I will take and look at the sites and see if I can get my head around it.

Bobby01
03-19-2008, 09:04 AM
Can anybody suggest another way of creating a form in Java that receives user input and opens a new page to display the input?
I would prefer not to use JSF or Struts, as I'm not familiar with them and New to Java Programming.
I urgently need some help.....Please.

chazzy
03-19-2008, 12:53 PM
Bobby,

JSF and Struts simply wrap the Servlet/JSP spec. Perhaps that would be a better way?

Bobby01
03-20-2008, 04:43 AM
How do i specify the form size in JSF?
I need to specify that the original form will be 400px by 500px and that the form that will display the result will be 800px by 400px.


The result should also flow over 30 lines as follows - How would i code that?:


• 30 lines of text of 30 characters in length should be displayed on the form.
With the first line starting in the top left hand corner of the form and
subsequent lines aligned with the first and evenly spaced below.

• The first line of text should contain the first 30 characters from the “Greeting
Message”, the second line should contain the 31st character plus the first 29
characters from the “Greeting Message”, the third line should contain the 30th
and 31st characters plus the first 28 characters from the “Greeting Message”,
and so on.

As in the example below:

Happy Birthday to Isaac Newton
Happy Birthday to Isaac Newto
n Happy Birthday to Isaac Newt
on Happy Birthday to Isaac New
ton Happy Birthday to Isaac Ne
wton Happy Birthday to Isaac N

• The font of the lines of text should be a monospace or non-proportional font
(e.g. Cour ier). Font size should be taken from the selected value of the Font
Size field.