Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java.lang. NumberFormatException: null

 
Keith Mc C
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello, i am doing a project for college, its an online cinema booking site.
i'm just trying to pass a film code from one jsp page to another like so..

<FORM METHOD="LINK" ACTION="showTimes.jsp?code=<% request.getParameter("code") %>">
<INPUT TYPE="submit" align="CENTER" VALUE="Show All Times/ Book Now">
</FORM>


but i am getting an exception and am stuck. i'm sure its something fairly basic but HTML/JSPs not my strong point.

please help! thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65535
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First things first: I would lose the all upper-case. It makes your code look very 1995 and very difficult to read. Use all lowercase for your HTML tags. Your code will be easier to read and will be (more) XHTML compatible.

Second, LINK is not a valid value for the method attribute of the form element. POST and GET are the only legal values. What are you trying to do with "LINK"?

Lastly, without more details as to the exception you are getting, there's not much other advice that can be given. Is the number format exception happening when this page is displayed, or after you submit the form?

Have you looked at the rendered HTML for the page (do a View Source in the browser) to make sure that the JSP is turning into what you expect?
[ April 24, 2006: Message edited by: Bear Bibeault ]
 
Keith Mc C
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks that helped, i'm a bit of a dumbass when it comes to HTML.
didnt need a form at all, a regular link will do. nice one
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65535
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did that magically fix your problem?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!