• Post Reply Bookmark Topic Watch Topic
  • New Topic

Postgresql custom data type

 
Keith Fiske
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Recently started learning JSP to make a web application using Postgresql as the backend. I've only been using the JSTL so far when programming the web front end and not doing any raw java coding. I added a custom data type to Postgresql and got that working on the database end. Now I've come across the problem where JSP is reporting back that I can't insert the data because the types are missmatched (form is sending the type VARCHAR and it's expecting my custom type). I saw how to fix this for when I need to insert Integers using fmt:parseNumber. I'm kind of lost now how to parse for my custom type.

Thanks!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65533
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your custom type should be converted to one of the "normal" Java types long before it gets to the UI. Or are you using the dreaded JSTL SQL tags?
 
Keith Fiske
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using <sql:update> if that's what you mean, yes. Guess custom data types are going beyond what JSTL sql tags can provide?
 
Keith Fiske
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just saw your other reply to someone else asking about JSTL SQL. I did not realize that was not best practice to use it like that. I was planning on going to the MVC architecture but my project is just starting out and I've never actually put MVC to use yet. Guess now at the beginning is a good time to change gears and start it the right way. Appreciate your help!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65533
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good plan! And you're welcome.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!