You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by mmfarhan <fa...@cybercomcity.com> on 2006/10/03 17:57:35 UTC
Display from MySQL Text Field
Hi,
I am trying to display text which is stored in mysql text field. But it
displays nothing. and when i try this code:
<c:out value="${rowSrearch.pDetails}" />
<c:set var="text" value="${rowSrearch.pDetails}"/>
<%
String text = (String)pageContext.getAttribute("text");
out.print(text);
%>
it gives me null.
What is the best way to reterive date from MySQL text field.
I am using:
Apache2
Tomcat 5.5.17
MySQK 5.0.22
mysql-connector-java-5.0.3
Thanks
Regards,
Farhan
--
View this message in context: http://www.nabble.com/Display-from-MySQL-Text-Field-tf2377092.html#a6623137
Sent from the Taglibs - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: Display from MySQL Text Field
Posted by mmfarhan <fa...@cybercomcity.com>.
Hi,
It looks like something to do with alias.
I am using aliases and that is the problem i found.
I am pasting my query:
SELECT
`Properties`.`idProperties`,
`Properties`.`Details` AS `pDetails`,
`Properties`.`Price`,
`PropType`.`TypeName`,
`TypeSpecs`.`Spec`,
`PropertyTypeSpec`.`Details` AS `sDetails`,
`PropertyTypeSpec`.`YesNo`,
`PropertyTypeSpec`.`Nums`,
`TypeSpecs`.`DisplayType`,
`PropNumber`.`idusers`,
`TypeSpecs`.`idPropType`,
`PropType`.`DateUpdated`
FROM
`Properties`
Inner Join `PropNumber` ON `PropNumber`.`idPropNumber` =
`Properties`.`idPropNumber`
Inner Join `PropType` ON `PropType`.`idPropType` =
`Properties`.`idPropType`
Inner Join `PropertyTypeSpec` ON `Properties`.`idProperties` =
`PropertyTypeSpec`.`idProperties`
Inner Join `TypeSpecs` ON `TypeSpecs`.`idTypeSpecs` =
`PropertyTypeSpec`.`idTypeSpecs` AND `PropType`.`idPropType` =
`TypeSpecs`.`idPropType`
WHERE
`Properties`.`idProperties` IN ('25', '26')
now if i remove `PropertyTypeSpec`.`Details` AS `sDetails` and remove
`pDetails` alias, it start showing details.
Is there any solution where i don't have to change column name in database
table ?
Regards,
Farhan
On 10/3/06, mmfarhan <fa...@cybercomcity.com> wrote:
>
> Hi,
> I am trying to display text which is stored in mysql text field. But it
> displays nothing. and when i try this code:
> <c:out value="${rowSrearch.pDetails}" />
<snip/>
Could simply be EL-2 [1]. Try changing property name to 'pdetails' (or
some such).
-Rahul
[1] https://issues.apache.org/jira/browse/EL-2
--
View this message in context: http://www.nabble.com/Display-from-MySQL-Text-Field-tf2377092.html#a6638060
Sent from the Taglibs - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
RE: Display from MySQL Text Field
Posted by Lamine <la...@hotmail.com>.
Fahran,
I will just assume that you did not use a loop...
Make sure that ${rowSreach} is an item in a <c:forEach> loop before you
can collect a field value from each record... You have to do this even
if you have only 1 record in your table.
Hope that helps.
Lamine.
-----Original Message-----
From: Rahul Akolkar [mailto:rahul.akolkar@gmail.com]
Sent: Tuesday, October 03, 2006 2:23 PM
To: Tag Libraries Users List
Subject: Re: Display from MySQL Text Field
On 10/3/06, mmfarhan <fa...@cybercomcity.com> wrote:
>
> Hi,
> I am trying to display text which is stored in mysql text field. But
it
> displays nothing. and when i try this code:
> <c:out value="${rowSrearch.pDetails}" />
<snip/>
Could simply be EL-2 [1]. Try changing property name to 'pdetails' (or
some such).
-Rahul
[1] https://issues.apache.org/jira/browse/EL-2
> <c:set var="text" value="${rowSrearch.pDetails}"/>
> <%
> String text = (String)pageContext.getAttribute("text");
> out.print(text);
> %>
>
> it gives me null.
>
> What is the best way to reterive date from MySQL text field.
>
> I am using:
> Apache2
> Tomcat 5.5.17
> MySQK 5.0.22
> mysql-connector-java-5.0.3
>
> Thanks
>
> Regards,
> Farhan
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.407 / Virus Database: 268.12.11/460 - Release Date:
10/1/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.407 / Virus Database: 268.12.11/460 - Release Date:
10/1/2006
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: Display from MySQL Text Field
Posted by Rahul Akolkar <ra...@gmail.com>.
On 10/3/06, mmfarhan <fa...@cybercomcity.com> wrote:
>
> Hi,
> I am trying to display text which is stored in mysql text field. But it
> displays nothing. and when i try this code:
> <c:out value="${rowSrearch.pDetails}" />
<snip/>
Could simply be EL-2 [1]. Try changing property name to 'pdetails' (or
some such).
-Rahul
[1] https://issues.apache.org/jira/browse/EL-2
> <c:set var="text" value="${rowSrearch.pDetails}"/>
> <%
> String text = (String)pageContext.getAttribute("text");
> out.print(text);
> %>
>
> it gives me null.
>
> What is the best way to reterive date from MySQL text field.
>
> I am using:
> Apache2
> Tomcat 5.5.17
> MySQK 5.0.22
> mysql-connector-java-5.0.3
>
> Thanks
>
> Regards,
> Farhan
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org