• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSTL SQL syntax for database attribute with a space in between  RSS feed

 
Rajibul Alam
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am working on a project that was designed 10 year back and some of the attributes name in that database has a space in between.

For example Company Name

if there a way to get this value using

<sql:setDataSource dataSource="jdbc/_Ob" />
<sql:query var="selectedRows"
sql="select * from SystemUser where SystemUserID = ?">
<sql:param value = "${SYSTEMUSERID}"/>
</sql:query>
<c:forEach var="currentRow" items="${selectedRows.rows}">
<c:set var="CompanyName" value="${currentRow.['Company Name']}" />
....



thanks in advance
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66158
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this is a legacy app, why are you introducing the JSTL SQL tags into it when those should only be used for prototyping?
 
Rajibul Alam
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:If this is a legacy app, why are you introducing the JSTL SQL tags into it when those should only be used for prototyping?


I am writing the whole application using J2EE but still need to use the old database .....and Using the JSTLSQL tags just for Select to show data in profile pages. All main SQl are done in Servlets.

I guess I can use Beans to store the values from a servlet and then pass em through session n show em in the JSP but I felt that might be too much for the purpose.

But If you have any suggestions then I would really appreciate it. Plus the main Question remains...Is it possible to access [Company name] (attribute with a space) value in JSTL.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66158
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know the answer to your question because I would never use the JSTL SQL tags for anything.

I strongly recommend you do the same.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!