Purpose of TAG Library?
What is the purpose of TAG library?
I feel so hard while using Tag library in my JSP pages?
Which taglibrary are you talking about? JSTL?
If so, its purpose is just to control the flow of code logic and the data output in JSP. It is less or more a replacement of scriptlets, which are been discouraged since a decade. Scriptlets are considered a bad practice. Taglibs (and EL) forces you to write clean and well-MVC-formed JSP code. The JSTL core, format and functions taglibs are extremtly useful. The JSTL sql and xml taglibs are intented for quick prototyping only, in real you should be using Java classes for this to avoid tight coupling of database/business/model/view logic.
Similar Messages
-
Logging issue with rssutils.tld Tag Library
I'm using the rssutils.tld tag library to display three RSS feeds on my application's JSP homepage. It works very very well and I'm quite happy with the results (I'm running on a Tomcat 5.5.7 server). I implemented the solution following the examples in the tutorial at http://java.sun.com/developer/technicalArticles/javaserverpages/rss_utilities
The only problem I'm having though is in my Tomcat logs. Whenever a user loads my home page, a ton of tags are written to my tomcat stdout log:
<rss>
<channel>
<title>
</title>
<link>
</link>
<description>
</description>
<language>
</language>
<copyright>
</copyright>
and so on for several hundred lines. This not only fills up my logs very very quickly, I'm worried about performance. Has anyone run into this problem and, if so, have a suggestion on how to have the tag library only log errors instead of every tag it processes? Thanks in advance.There are 2 System.out's in com/sun/cnpi/rss/handlers/DocumentHandler.class For test purposes I commented these out and it resolved the issue. I think the license allows modifications and redistribution as long as the copyright notice is included but I am no expert on legal stuff. If someone can assist me with this I would be happy to provide the modified package.
-
Is It legal to use Jakarta I18N Tag Library in my projects on work?
I'm a JSP pages developer on my work and Jakarta I18N Tag Library is very usefull for me.
But I'm not sure about licensing. Can I use this library in commercial projects?I am not a lawyer, but ys, the Apache Lisence allows you to use the library for such a purpose.
-
I am teaching myself how to use Dreamweaver CS4. I am interested in finding out more about the Tag Library.
How can I find a list c/w definition of the tags.
How can I find out the settings of a tag. For example, what are the font, size etc settings for the tag <h1>?
Can any of the settings for these tags be changed or do I have to set up a new class within the CSS to accomplish this?
Thanks, AlanThe tag library simply defines the tags that are supported by Dreamweaver. It has nothing to do with font sizes or anything like that.
It sounds as though you are completely new to website design. If so, the tag library is something you won't need to bother with for many years. I have been developing websites for 16 years, and go to the tag library about once a year, if that.
Go to www.w3schools.com, and learn about HTML and CSS. Also visit the Dreamweaver Developer Centre Getting Started Section (http://www.adobe.com/devnet/dreamweaver/?view=gettingstarted), and follow the tutorials there. Once you have done so, come back here and ask more questions. But forget about the tag library. Its purpose is to determine whether tags should be indented, or start on new lines. It's also for advanced users to add custom tags of their own, for example when creating XML files that don't use standard tags. -
Hi, can anyone advise as to whether my tag library code (based
on Apache Jakarta Project) will actually achieve connection
pooling functionality across my entire JSP based application? I
am slightly concerned that my OracleConnectionCacheImpl object
may exist multiple times, hence rendering my conection pooling
attempt useless.
package com.solved.tag.dbtags.connection;
import java.io.IOException;
import java.sql.Connection;
import java.sql.SQLException;
import javax.servlet.jsp.tagext.TagSupport;
import javax.servlet.jsp.JspTagException;
import javax.sql.DataSource;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import oracle.jdbc.pool.OracleConnectionCacheImpl;
* <p>JSP tag connection, used to get a
* java.sql.Connection object.</p>
* <p>JSP Tag Lib Descriptor
* <pre>
* <name>connection</name>
<tagclass>com.solved.tag.dbtags.connection.ConnectionTag</t
agclass>
* <bodycontent>JSP</bodycontent>
<teiclass>com.solved.tag.dbtags.connection.ConnectionTEI</t
eiclass>
* <info>Opens a connection based on a jndiName.</info>
* <attribute>
* <name>id</name>
* <required>true</required>
* <rtexprvalue>false</rtexprvalue>
* </attribute>
* </pre>
* @author Matt Shannon
public class ConnectionTag extends TagSupport {
static private OracleConnectionCacheImpl cache = null;
public int doStartTag() throws JspTagException {
try {
Connection conn = null;
if (cache == null) {
try {
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup
("jdbc/pool/OracleCache");
cache = (OracleConnectionCacheImpl)ds;
catch (NamingException ne) {
throw new JspTagException(ne.toString());
conn = cache.getConnection();
pageContext.setAttribute(getId(),conn);
catch (SQLException e) {
throw new JspTagException(e.toString());
return EVAL_BODY_INCLUDE;
package com.solved.tag.dbtags.connection;
import java.sql.Connection;
import java.sql.SQLException;
import javax.servlet.jsp.tagext.TagSupport;
* <p>JSP tag closeconnection, used to close the
* specified java.sql.Connection.<p>
* <p>JSP Tag Lib Descriptor
* <pre>
* <name>closeConnection</name>
<tagclass>com.solved.tag.dbtags.connection.CloseConnectionTag&
lt;/tagclass>
* <bodycontent>empty</bodycontent>
* <info>Close the specified connection. The "conn"
attribute is the name of a
* connection object in the page context.</info>
* <attribute>
* <name>conn</name>
* <required>true</required>
* <rtexprvalue>false</rtexprvalue>
* </attribute>
* </pre>
* @author Matt Shannon
* @see ConnectionTag
public class CloseConnectionTag extends TagSupport {
private String _connId = null;
* The "conn" attribute is the name of a
* page context object containing a
* java.sql.Connection.
* @param connectionId
* attribute name of the java.sql.Connection to
close.
* @see ConnectionTag
public void setConn(String connectionId) {
_connId = connectionId;
public int doStartTag() {
try {
Connection conn = (Connection)pageContext.getAttribute
(_connId);
conn.close();
} catch (SQLException e) {
// failing to close a connection is not fatal
e.printStackTrace();
return EVAL_BODY_INCLUDE;
public void release() {
_connId = null;
package com.solved.tag.dbtags.connection;
import javax.servlet.jsp.tagext.TagData;
import javax.servlet.jsp.tagext.TagExtraInfo;
import javax.servlet.jsp.tagext.VariableInfo;
* TagExtraInfo for the connection tag. This
* TagExtraInfo specifies that the ConnectionTag
* assigns a java.sql.Connection object to the
* "id" attribute at the end tag.
* @author Matt Shannon
* @see ConnectionTag
public class ConnectionTEI extends TagExtraInfo {
public final VariableInfo[] getVariableInfo(TagData data)
return new VariableInfo[]
new VariableInfo(
data.getAttributeString("id"),
"java.sql.Connection",
true,
VariableInfo.AT_END
data-sources.xml:
<?xml version="1.0"?>
<!DOCTYPE data-sources PUBLIC "Orion data-
sources" "http://xmlns.oracle.com/ias/dtds/data-sources.dtd">
<data-sources>
<data-source
class="oracle.jdbc.pool.OracleConnectionCacheImpl"
name="jdbc/pool/OracleCache"
location="jdbc/pool/OracleCache"
url="jdbc:oracle:thin:@oracle1:1521:pdev"
>
<property name="maxLimit" value="15" />
<property name="cacheScheme" value="2" />
<property name="user" value="console" />
<property name="password" value="console" />
<description>
This DataSource is using an Oracle-native DataSource Class so as
to allow Oracle Specific extensions.
A getConnection() call on this DataSource will return
oracle.jdbc.driver.OracleConnection.
The connection returned is a logical connection.
The caching scheme in place is Fixed Wait. Refer below to
possible values.
Dynamic 1
Fixed Wait 2
Fixed Return Null 3
</description>
</data-source>
</data-sources>
many thanks,
Matt.Hi. Show me your pool definition.
Joe
Ramamurthy wrote:
I am using the jsp custom tag library from BEA called sqltags.tld which came with Weblogic 5.1. Currently I am using Weblogic6.1 sp2 on Solaris.
I have created a Connection Pool for Sybase database using the driver com.sybase.jdbc.SybDriver.
When I created jsp page to connect to the connection pool using sqltags custom tag library, I am getting the error
"javax.servlet.jsp.JspException: Failed to write body content
at weblogic.taglib.sql.ConnectionTag.doAfterBody(ConnectionTag.java:43)
at jsp_servlet.__hubwcdata._jspService(__sampletest.java:1014)"
After this message, whenever I try to access the same jsp page I am getting the message
"javax.servlet.jsp.JspException: Failed to load JDBC driver: weblogic.jdbc.pool.D
river
at weblogic.taglib.sql.ConnectionTag.doStartTag(ConnectionTag.java:34)
at jsp_servlet.__hubwcdata._jspService(__sampletest.java:205)".
Can you please help me the reason why this problem is happening and how to fix this ?
This problem doexn't happen consistently. This occurs once in a while.
I tried to increase Login delay Seconds parameter in the Connection Pool to 15 sec. It didn't help me much.
Thanks for your help !!!
Ram -
How can i use tag library in the mvc?
hello
in some tag libraris such as jakarta tag library and jrun tag library,there is database
access tag, it provide convenient function to access database from jsp page,but i wonder how can i use such a tag within MVC architecture.
as we know,in MVC architecture,all requests from the jsp pages are submit to the controller servlet,then the controller manipulate ejb to access database,it don't allow the database access from the jsp page.
who can tell me how can i combine the tag library with mvc architecture appropriately?
thank you!You can't! If you decide to limit the JSP to be part of the View component, obviously you should not include tags that directly access the database. If the strict MVC architecture is less important to you, then the tags can save coding time. It's your choice.
-
How to use a tag library in multiple web applications?
Morning all,
Environment: Tomcat 5 on Apache2 using Mod_JK connector on Windows XP
I have developed a custom tag library and tested it out and its working great.
Now, How do I use in my other web applications? Do I need to copy the JAR file to webapps\app1\WEB-INF\lib, webapps\app2\WEB-INF\lib etc directories?
The problem with this approach is, if I happen to change the tag library code, I will have to make sure that I remember to copy the new JAR file to the above mentioned directories. Ofcourse I can write a simple ant script that would do it for me, but I was wondering if there was an efficient and yet simple way of achieving the same.
Thanks in advance,
JoeThanks Vidyut! You've answered my question.
I placed the jar file in the $CATALINA_HOME/shared/lib directory. But where should I place the taglib TLD file? And how should I reference it in web.xml?
Currently, my web.xml is as follows and it doesn't work.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<taglib>
<taglib-uri>http://abc.com</taglib-uri>
<taglib-location>c:\Tomcat\shared\lib\mytags-taglib.tld</taglib-location>
</taglib>
</web-app>
Thanks again!
Joe -
How to add a new tag library into ALBPM 5.7?
I want to use a tag library but I don't know ho to configure ALBPM to use it.
Anyone knows how to do it?
Thanks
RegardsHello,
I think u need to import all resources used by your TagLib as .TLD .JAR to inside process. -
I am using Weblogic server 8.1 and have a struts app. I am using the random taglib
from jarkarta and recieving this error while using weblogic. With the same setup
in tomcat everything works fine. What do I need to do special for weblogic?
ERROR FROM WEBLOGIC
/control/register/newMember.jsp(1): Error in using tag library uri='http://jakarta.apache.org/taglibs/random-1.0'
prefix='randME': For tag 'string', cannot load extra info class 'org.apache.taglibs.random.RandomStrgTEI'
probably occurred due to an error in /control/register/newMember.jsp line 1:
<%@ taglib uri="http://jakarta.apache.org/taglibs/random-1.0" prefix="randME"
%>
taglibs-random.jar is in WEB-INF/lib
random.tld is in WEB-INF
the taglib include in my jsp looks like this:
<%@ taglib uri="http://jakarta.apache.org/taglibs/random-1.0" prefix="randME"
%>
the call in my jsp looks like this:
<randME:number id="random1" range="10000000-99999999"/>
my web.xml looks like this:
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/random-1.0</taglib-uri>
<taglib-location>/WEB-INF/random.tld</taglib-location>
</taglib>
any help would be appreciated
This may not solve your problem, but WL8.1 SP1 seems to have a problem with
closing tags.
Where you are using:
<randME:number id="random1" range="10000000-99999999"/>
...try this instead:
<randME:number id="random1" range="10000000-99999999"></randME:number>
This problem is fixed in SP2.
-- Craig
"ssandy" <[email protected]> wrote in message news:[email protected]...
>
> I am using Weblogic server 8.1 and have a struts app. I am using the
random taglib
> from jarkarta and recieving this error while using weblogic. With the
same setup
> in tomcat everything works fine. What do I need to do special for
weblogic?
>
> ERROR FROM WEBLOGIC
>
> /control/register/newMember.jsp(1): Error in using tag library
uri='http://jakarta.apache.org/taglibs/random-1.0'
> prefix='randME': For tag 'string', cannot load extra info class
'org.apache.taglibs.random.RandomStrgTEI'
> probably occurred due to an error in /control/register/newMember.jsp line
1:
> <%@ taglib uri="http://jakarta.apache.org/taglibs/random-1.0"
prefix="randME"
> %>
>
> taglibs-random.jar is in WEB-INF/lib
> random.tld is in WEB-INF
>
> the taglib include in my jsp looks like this:
> <%@ taglib uri="http://jakarta.apache.org/taglibs/random-1.0"
prefix="randME"
> %>
>
> the call in my jsp looks like this:
> <randME:number id="random1" range="10000000-99999999"/>
>
> my web.xml looks like this:
> <taglib>
> <taglib-uri>http://jakarta.apache.org/taglibs/random-1.0</taglib-uri>
> <taglib-location>/WEB-INF/random.tld</taglib-location>
> </taglib>
>
> any help would be appreciated
-
Error in using struts tag library
Platform information:
Windows XP
BEA Weblogic Server 8.1 (Developer)
Struts 1.1
I am unable to compile the following JSP in weblogic because it says there is
an error using the struts-html tag library. (Details about the error are mentioned
after the JSP)
My JSP file is:
===================================================================
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ page import="com.hipaaccelerator.runtime.HARuntime" %>
<jsp:useBean id='logonForm' scope='request' class='com.hipaaccelerator.hipaax.form.LogonForm'/>
<html:html>
<head>
<title>Logon</title>
<link rel='stylesheet' href="<html:rewrite page='/styles/default.css'/>" type='text/css'
>
<script language='javascript' src="<html:rewrite page='/scripts/default.js'/>"
type='text/javascript'></script>
</head>
<body>
<html:form action='/logon.do' >
<table border='0' align='center' >
<tr><td height='10'></td></tr>
<tr>
<td align='center'>
<html:img src='/images/Logo.gif' height='70'
width='449'/>
</td>
</tr>
<tr><td height='10'></td></tr>
</table>
<table align='center' width='100%' >
<tr><td height='10'></td></tr>
<tr>
<td height='20' width='10%'> </td>
<td height='20' colspan='3' align='center' style="font-size: 18pt; color:
blue;
background-color: white; text-align:center">PAC
</td>
<td height='20' width='10%'> </td>
</tr>
<tr><td height='10'></td></tr>
<tr>
<td height='20' width='10%'> </td>
<td height='20' width='8%'> </td>
<td height='20' align='center' style="border-style:solid; border-width:2pt;
font-
size: 10pt; color: red; background-color: white; text-align:center">
<%= HARuntime.instance().getConfig().getProperty("logonAnnouncement")
%>
</td>
<td height='20' width='8%'> </td>
<td height='20' width='10%'> </td>
</tr>
<tr><td height='10'></td></tr>
</table>
<table border='0' align='center' >
<tr>
<td class='formfieldname' ><b>User Name: </td>
<td class='formfield'>
<html:text property='username' maxlength='20' size='20'/>
</td>
</tr>
<tr><td class='formfieldspacer'></td></tr>
<td class='formfieldname' ><b>Password:</b> </td>
<td class='formfield'>
<html:password property="password" size="20" maxlength="20"
redisplay="false"/>
</td>
</tr>
<tr><td class='formfieldspacer'></td></tr>
<tr>
<td colspan='2' align='middle'>
<html:image src='/images/login.gif' onclick='document.forms[0].submit();
return false;' />
</td>
</tr>
</table>
<br><br>
</html:form>
</body>
</html:html>
===================================================================
The translation of this page fails with the following error:
<Dec 16, 2003 5:06:13 PM MST> <Error> <HTTP> <BEA-101045> <[ServletContext(id=4595,name=hipaax,context-path=/hipaax)]
translation of /logon.jsp failed:
weblogic.servlet.jsp.JspException: (line 1): Error in using tag library uri='/WEB-INF/struts-html.tld'
prefix='html': The Tag class 'org.apache.struts.taglib.html.BaseTag' has no setter
method corresponding to TLD declared attribute 'server', (JSP 1.1 spec, 5.4.1)>
===================================================================
I have struts.jar in /web-inf/lib. I have taglib (uri and location) definitions
in web.xml.I have all the struts tld files under /web-inf. Is there anything
else I have to do?
Any help would be greatly appreciated.
Thank you.
SharmilaUpdate: I just looked up the WL version and it's 8.1 sp3
So, I guess, JSTL 1.1 (which includes jstl fn tags) is not supported by WL.... Someone correct me if I am wrong.
Thanks,
pal :) -
Error in using tag library uri='weblogic.tld'
Hmmm...
I'm trying to config my userprofile by creating it in the tools application (myserver/tools/index.jsp),
but when I try to access the Unified Profile Types I get an Error 500 Internal
Server Error in my webbrowser. The weblogic.log prints out an errormessage that
sounds something like this:
####<30-Aug-01 16:30:14 CEST> <Error> <HTTP> <Ast-WT01> <server01> <ExecuteThread:
'14' for queue: 'default'> <system> <> <101020> <[WebAppServletContext(3530676,tools)]
Servlet failed with Exception>
weblogic.servlet.jsp.JspException: (line 24): Error in using tag library uri='weblogic.tld'
prefix='wl': For tag 'repeat', cannot load extra info class 'weblogicx.jsp.tags.RepeatTagInfo'
I'm running weblogic 6.0 and wlcs 3.5. I'm sure of that the tag libraries are
correct and they are located under tools/web-inf.Hmmm...
I'm trying to config my userprofile by creating it in the tools application (myserver/tools/index.jsp),
but when I try to access the Unified Profile Types I get an Error 500 Internal
Server Error in my webbrowser. The weblogic.log prints out an errormessage that
sounds something like this:
####<30-Aug-01 16:30:14 CEST> <Error> <HTTP> <Ast-WT01> <server01> <ExecuteThread:
'14' for queue: 'default'> <system> <> <101020> <[WebAppServletContext(3530676,tools)]
Servlet failed with Exception>
weblogic.servlet.jsp.JspException: (line 24): Error in using tag library uri='weblogic.tld'
prefix='wl': For tag 'repeat', cannot load extra info class 'weblogicx.jsp.tags.RepeatTagInfo'
I'm running weblogic 6.0 and wlcs 3.5. I'm sure of that the tag libraries are
correct and they are located under tools/web-inf. -
"No tag library could be found with this URI" error while compiling jsp
I am using WebLogic Server 9.2 MP1, JDK 1.5.0_09, Struts 1.3.5
I am pre-compiling jsp pages with wlappc ant task. However, I got following errors when a jsp page contains ant taglib:
No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.
The jsp page looks like:
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
wlappc complains taglib could not be retrieved from this uri. Actually, since Struts 1.3.5, those ".tld" files are contained in strust-taglib-1.3.5.jar, folder META-INF/tld/. And I don't need to set anything in web.xml <tag-lib> tab anymore.
All the jsp pages can be successfully compiled while being deployed to Server. So what am I missing? My build.xml file looks like:
<target name="compile-jsp">
<wlappc source="${src.dir}" output="${out.dir}"
keepgenerated="true" optimize="true" classpathref="wl_classpath"/>
</target>
where "wl_classpath" contains all the struts related jar files, e.g. struts-core-1.3.5.jar, struts-taglib-1.3.5.jar, ...., and weblogic related jars, e.g. weblogic.jar.....
I checked "beehive" samples coming with weblogic92, and found it pretty much did the same thing regarding build script and jsp files. So I am totally lost!
Please help me out. Many thanks.
Edited by jqian at 02/02/2007 10:24 AMYes sorry, you're correct. The uri I mentioned is just 1.0.
Do you have the "Oracle WebLogic Web App Extension" Facet for your web project? If not, try adding that and making sure that there is a weblogic.xml file created in the WEB-INF dir. The weblogic.xml file allows you to deploy usig a shared lib for JSTL. It should contain a library-ref element something like the following, with a version of 1.1.
<wls:library-ref>
<wls:library-name>jstl</wls:library-name>
<wls:specification-version>1.1</wls:specification-version>
<wls:exact-match>true</wls:exact-match>
</wls:library-ref> -
I recently moved from coldfusion 8 to coldfusion 9 but all the pages with cfgrid: is throwing the following error. Any suggestion would be of great help
coldfusion.jsp.JRunTagLibraryInfo$NoSuchAttributeException: The tag handler gridcolumn does not have a setter for the attribute autoExpand specified in the Tag Library Descriptor.
at coldfusion.jsp.JRunTagLibraryInfo.getPropertyType(JRunTagLibraryInfo.java:627)
at coldfusion.jsp.JRunTagLibraryInfo.buildTagInfo(JRunTagLibraryInfo.java:585)
at coldfusion.jsp.JRunTagLibraryInfo.getTag(JRunTagLibraryInfo.java:267)
at coldfusion.compiler.NeoTranslationContext.findTagName(NeoTranslationContext.java:346)
at coldfusion.compiler.NeoTranslationContext.isKnownTag(NeoTranslationContext.java:222)
at coldfusion.compiler.CFMLParserBase.isKnownTagName(CFMLParserBase.java:589)
at coldfusion.compiler.cfml40TokenManager.TokenLexicalActions(cfml40TokenManager.java:6704)
at coldfusion.compiler.cfml40TokenManager.getNextToken(cfml40TokenManager.java:6586)
at coldfusion.compiler.cfml40.getToken(cfml40.java:11879)
at coldfusion.compiler.CFMLParserBase.isTrivialAngleBracket(CFMLParserBase.java:707)
at coldfusion.compiler.cfml40.jj_3_1(cfml40.java:9392)
at coldfusion.compiler.cfml40.jj_3_2(cfml40.java:9460)
at coldfusion.compiler.cfml40.jj_3R_67(cfml40.java:9500)
at coldfusion.compiler.cfml40.jj_3_86(cfml40.java:8147)
at coldfusion.compiler.cfml40.jj_3R_92(cfml40.java:8584)
at coldfusion.compiler.cfml40.jj_3_85(cfml40.java:8641)
at coldfusion.compiler.cfml40.jj_2_85(cfml40.java:7619)
at coldfusion.compiler.cfml40.cfml(cfml40.java:4215)
at coldfusion.compiler.cfml40.cfif(cfml40.java:311)
at coldfusion.compiler.cfml40.cfml(cfml40.java:4224)
at coldfusion.compiler.cfml40.cfif(cfml40.java:311)
at coldfusion.compiler.cfml40.cfml(cfml40.java:4224)
at coldfusion.compiler.cfml40.cfelse(cfml40.java:442)
at coldfusion.compiler.cfml40.cfelseif(cfml40.java:374)
at coldfusion.compiler.cfml40.cfif(cfml40.java:314)
at coldfusion.compiler.cfml40.cfml(cfml40.java:4224)
at coldfusion.compiler.cfml40.start(cfml40.java:4664)
at coldfusion.compiler.NeoTranslator.parsePage(NeoTranslator.java:667)
at coldfusion.compiler.NeoTranslator.parsePage(NeoTranslator.java:648)
at coldfusion.compiler.NeoTranslator.parseAndTransform(NeoTranslator.java:401)
at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:343)
at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:144)
at coldfusion.runtime.TemplateClassLoader$TemplateCache$1.fetch(TemplateClassLoader.java:418 )
at coldfusion.util.LruCache.get(LruCache.java:180)
at coldfusion.runtime.TemplateClassLoader$TemplateCache.fetchSerial(TemplateClassLoader.java :362)
at coldfusion.util.AbstractCache.fetch(AbstractCache.java:58)
at coldfusion.util.SoftCache.get_statsOff(SoftCache.java:133)
at coldfusion.util.SoftCache.get(SoftCache.java:81)
at coldfusion.runtime.TemplateClassLoader.findClass(TemplateClassLoader.java:591)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:80)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)
at coldfusion.CfmServlet.service(CfmServlet.java:201)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 )
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)Thanks Vishu,
We are running Coldfusion 9 and attach is the sample code and error message.:
The tag handler gridcolumn does not have a setter for the attribute autoExpand specified in the Tag Library Descriptor.
The CFML compiler was processing:
A cfgrid tag beginning on line 39, column 18.
The error occurred in E:/Websites/DreData/sobrietytesting/main/Sobrietytesting/Admin/view_users.cfm: line 54
52 : hrefkey="member_id"
53 : bind="cfc:tabledisplay.browseAccessAcountRequests(,,,)"
54 : >
55 : -
I have a small web app that makes needs to make about 12 SQL queries in a JSP and am trying to figure out what is the best way to do this
I had initially coded this using plain JAVA code in the JSP as follows :-
<%
Connection conn = null;
Statement st = null;
ResultSet rs = null;
try {
st = conn.createStatement();
rs = st.executeQuery("select .........");
%>
But then I came across the SQL Tag Library in an article and wonder if this is more efficient code?
If so does anyone have a pointer to a good intro to these tags as they look complicated (I only am doing queries on the SQL database, no inserts or updates)Sometimes you've gotta do what you've gotta do.
My rule is "no scriptlets".
If you MUST access a database from a JSP, the only right way to do it is to use JSTL <sql> tags.
% -
Best way to call EJB - Servlet or Tag Library
Hi,
What is the best way to call an EJB from a JSP? We are using Weblogic 7.0(moving to 8.1 beta). WE have a form on a JSP that needs to get data from an EJB. Our flow goes from JSP --> Controller servlet or tag library -->EJB "Bean" Controller ---> EJB. The specfic EJB we need to populate drop downs and fields will be called by a bean controller. Is it better to call the bean controller using a tag library in the jsp or go to the controller servlet to get the data? If servlet is the answer, where do I lookup the EJB Home and call the create from within the servlet? Any help would be greatly appreciated!!
Thanks!IMO, if you are following some design patterns, like the MVC framework, the best thing is to populate the model(entities that contain the business data) and call the respective getXX methods from the model on the JSP page. The reason for doing so is to keep JSP pages away from any other work other than to just display the business data contained in the respective business entities.
The model can be populated in the servlet and either set in the request or session attribute as per the requirement.
The EJB can be looked up in the servlet as and when required. I would suggest to make use of the Service Locator Pattern to do a look up for the EJB Remote Interface and accordingly make the business calls.
Hopefully this answers some of your questions.
Maybe you are looking for
-
Copying database objects and data from one server database to another server database in AG group
Hi, I am still trying to wrap my head around sql clusters and AGs and I have a project that requires I take a vendor's database and restore it weekly so its available on the production server which is clustered. The vendor's database on the cluster i
-
How do I best wipe clean all music and photos from my Nano? Any help is appreciated, thank you.
-
I have uninstalled and reinstalled iTunes Version 11.4.1 and still cannot access. I continue to get the Error 7 Windows Error 193 and now I am getting the Apple Mobile Device failed to start. I can't access any of my music I HAVE PURCHASED. What to
-
Windows 7 restarts in a guest profile after updating to Firefox 15.0.1
Win 7 64-bit works normally after installing the FF 15.0.1 update. But when I quit and restart, Win 7 uploads to a guest profile (and a totally new empty desktop). I had to go into Win safe mode and do a recovery (i.e. a point before the FF update) t
-
What's up with the mountain lion toolbar question mark on the right side?
There was a picture connected to the right side of my toolbar. I deleted it and now a question mark sits in its place. How do I access this and correct it?