How to use custom tag in jsp
sir
plz tell me how to use custom tag in jsp.plz describe it.
i will be thankful to u
Do you want to use taglibs or develop custom tags? Either way take a look at these:
http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags.html
http://www.stardeveloper.com/articles/display.html?article=2001081301&page=1
http://www.onjava.com/pub/a/onjava/2000/12/15/jsp_custom_tags.html
http://jakarta.apache.org/taglibs/tutorial.html
http://www.ibm.com/developerworks/edu/j-dw-java-custom-i.html
http://www.herongyang.com/jsp/tag.html
Similar Messages
-
How to use custome tag lib in the JSP page?
How to use custome tag lib in the JSP page?...with JDeveloper
http://www.oracle.com/webapps/online-help/jdeveloper/10.1.2/state/content/navId.4/navSetId._/vtTopicFile.working_with_jsp_pages%7Cjsp_ptagsregistering~html/
-
How to use standard tags in JSP
Hi all,
Just wanted to know how to use standard tags of endeca in JSP ... say for example to display Dimension Name using standard tags.
Thanks
--Sami was just checking whether we can use endeca TAG'S ( typo mistake in my earlier post not the JSTL standard library )....in my JSP
We cannot use endeca TAG ...as they are for different purpose.
Sameer -
How to use custom tags for integrating FCK Editor?
Hi All,
I am looking for the integrating the FCK Editor in my jsp page. any one can please provide the procedure of How to create fckeditor in jsp?
I have the jar file of fck editor but i am confusing while creating the custom tag for that editor.
I want like this:
<FCKeditor:fck ?> like this
Regards,
Sateeshgoogle answers it all..
[http://www.jroller.com/coreteam/entry/using_fckeditor_in_jsp_web]
[http://java.fckeditor.net/properties.html]
[http://java.fckeditor.net/java-core/tagreference.html] -
How to use Custom Tags for Theme and Base Map Definitions
In Mapviewer documentation I've found the following new feature:
The XML definition of a theme or base map now supports application-specific
attribute tags. You can use the Custom Tags option in the theme definition in Map
Builder to specify tags and their values, which can be interpreted by your application
but are ignored by MapViewer itself.
I'm able to define a custom tag in Mapbuilder, but how can I use it in my Application?
Thanks.As he said, you have to use as Platform service to create adapter in OIM.
tcUserOperationsIntf service = Platform.getService(Thor.API.Operations.tcUserOperationsIntf.class);
HashMap<String,String> searchmap=new HashMap<String,String>();
searchmap.put("Users.User ID", userID);
tcResultSet searchset=service.findAllUsers(searchmap); -
Urgent-how to access custom tag from jsp tag
I have a problem accessing a custom tag from a jsp expression.
Details: I have a custom tag that returns a string variable. I need to access that variable from jsp expression <%%>.
Can any body help me?Tags don't "return" values as in the normal sense.
They can only support TEI (Tag Extra Information) that just stuffs a declared variable into the page's state.
For example, if the tag class had a public method called getValue(), you could do the following:
<xmp:mytag id="foo"/>
<%
out.println("value is " + foo.getValue());
%> -
How to use messagebar tag in jsp page
i am working with "messagebar" control presents in the htmlb controls.
my aim is to display the message after pressing some button. how to give link for that.
if anybody have smple code for it please send me with component,jsp page and bean(if used)......
ragards,
ajoyHi,
If I understood you right, then you want to update the message shown in your messgebar, when user clicks on button.
To achieve this, have a MessageBar with no message text. And when ever a button is clicked in the event handling method of your button set message text to your messagebar.
public void showMessage(String message, MessageType type) {
messageBar.setMessage(type, message);
public void onClick(Event event) throws PageException {
showMessage("Clicked Button", MessageType.INFO);
Greetings,
Praveen Gudapati
[Points are always welcome for helpful answers] -
Problem using Custom tag in JSP
Iam facing problem when i am deploying my files on j2ee 1.4 server it give following erroer::
my .tld file and jsp are given below
any body can help me;
mytaglib.tld file:
<<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//
DTD JSP Tag Library 1.1//EN"
"http://java.sun.com/j2ee/dtds/
web-jsptaglibrary_1_1.dtd">
<!-- a tag library descriptor -->
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>first</shortname>
<uri></uri>
<info>A simple tab library for the
examples</info>
<tag>
<name>hello</name>
<tagclass>tags.HelloTag</tagclass>
<bodycontent>empty</bodycontent>
<info>Say Hi</info>
</tag>
</taglib>
MY JSP file :::
<%@ taglib uri="/WEB-INF/mytaglib.tld"
prefix="first" %>
<HTML>
<HEAD>
<TITLE>Hello Tag</TITLE>
</HEAD>
<BODY bgcolor="#ffffcc">
<B>My first tag prints</B>:
<first:hello/>
</BODY>
</HTML>
Error :::
org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: XML parsing error on file /WEB-INF/mytaglib.tld: (line 1, col 2)
org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:218)
org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.java:188)
org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:515)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:460)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:526)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1617)
org.apache.jasper.compiler.Parser.parse(Parser.java:174)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:244)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:146)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:132)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:245)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:462)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:448)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:551)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:300)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:284)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:200)thanks for reply it still giving error :
org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: XML parsing error on file /WEB-INF/mytaglib.tld
org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:218)
org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.java:188)
org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:515)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:460)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:526)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1617)
org.apache.jasper.compiler.Parser.parse(Parser.java:174)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:244)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:146)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:132)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:245)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:462)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:448)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:551)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:300)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:284)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:200) -
How to use nested tag in Struts
Hi..
Can any one guide me how to use nested tag in Struts. So far i already tried bean tag with no error but when i try to use nested tag i got error like
javax.servlet.ServletException: Cannot find bean: "" in any scope
Below are my class:
action class
session.setAttribute ("MyDetailList", detailList);
JSP page
<logic:iterate id="list" name="MyDetailList">
Company ID : <bean:write name="list" property="companyID" />
</logic:iterate>
For bean tag, i got no error at all and below are my code for nested tag
action class
session.setAttribute ("MyDetailList", detailList);
JSP Page
<nested:nest property="MyDetailList">
Make : <nested:text property="make"/>
Car ID : <nested:text property="carID"/>
</nested:nest>
When i run the code, i got error message
javax.servlet.ServletException: Cannot find bean: "" in any scope
Any body can help me?
zulwhat am I doing wrong?You will notice above that I mentioned
YOU CAN'T USE CUSTOM TAGS AS ATTRIBUTES TO OTHER CUSTOM TAGS
(was that loud enough for you to notice this time)?
Try
<html:text styleId="instruction" styleClass="text" size="50" name="instruction" property="value"/>
//or
<html:text styleId="instruction" styleClass="text" size="50" property="instruction" value="<%= instruction.getValue() %>"/>
better alternative: populate your formbean with your action and just have:
<html:text styleId="instruction" styleClass="text" size="50" property="instruction"/>
If you set the "instruction" property of your formBean in the action, the value will be automagically reflected here.
Cheers,
evnafets -
I am new to using custom tags. Is there a nice book or site which I could read on custom tags.
Also, I kind of understand custom tags but not completely confident.
I have a JSP that uses two custom tags, flight and segment. Basically, goes through each segment with flight tag and prints out attribute of segment with Segment tag. The code looks like this.
<flifo:flight isParent="true" fromParent="true" >
<td bgcolor="<%=bgcolor%>" width="94" valign="top" class="t7">
<%-- Print FLIGHT NUMBER --%>
Flight
<b><flifo:segment fromParent="true" attribute="flight_num" /></b>
<br>
</flifo:flight>
In the above code I just have flight_num but there are other attributes that it prints out. I want to check an attribute in segment and if it is ture then display some of the tags. How can I do it?This has helped me a lot in the past:
http://java.sun.com/developer/Books/javaserverpages/cservletsjsp/chapter14.pdf
... and the book it's extracted from is very good too. -
Can i use Custom Tags for Database retrieval (as per MVC pattern)?
In our project we are dealing with database, and i've used the Cutom Tags for database retrieval (as per the Article from Mr Faisal Khan) and it is working fine. But i have a doubt if it affects the performance in any way . I wanted to know if its recommendable to use Custom Tags for the DB retrieval as per MVC Pattern or shall i create a intermediate bean and then call the bean in custom tag.
Thanks
PrakashPutting database code in your JSPs certainly couples your view to the database. That's usually not good.
If it's a simple app, it might be justified.
When you start having lots of pages and complex business logic it becomes less attractive. - MOD -
Can i make own formatted textbox using custom tag
Hai,
Can i create own format textbox similar to vb activex control.for example i want make own formatted textbox for enter only numeric value if entry any alpha value it's show error.Is this possible using custom tagHai,
Can i create own format textbox similar to vb
activex control.for example i want make own
formatted textbox for enter only numeric value if
entry any alpha value it's show error.Is this
possible using custom tag
If you mean a custom text box in a web page without an applet (in other words an html component), then Java has nothing to do with it. And by mentioning activex (even only in a 'like' comparison), and custom tag, you are once again hinting that you want an html component. I think you need to place your request to a JavaScript Forum, which, once again, has absolutely nothing to do with Java.
A "custom tag" in JSP is not an HTML Tag. It may look a little like an html or xml tag, but it is evaluated on the server side. The control you need must be executed on the client side, which, once again, tells me you need to post to a JavaScript forum. -
How to use bean:write inside jsp:include ?
I got a problem about JSP's syntax. The following is my code:
<%@ include file="<bean:write name="HelloForm" property="target" />"%>
The double quotes inside bean:write is my problem. Could you please teach me how to use bean:write within JSP's include? Thank you!http://java.sun.com/products/jsp/syntax/1.2/syntaxref12.html
Include Directive vs <jsp:include>
The include directive <%@include %> is done at page translation/compile time.
It effectively pastes in a static file, and then compiles the JSP as if it was all one file.
As such, you cannot provide a runtime expression to it.
To do runtime inclusion, you need to use the <jsp:include> tag which does except runtime parameters.
<%String test = request.getParameter("pageInfo");%>
<%String link = test + ".jsp"; %>
<jsp:include page="<%= link %>" %>Unfortunately you can't use the tag with a bean:write tag as well, you can only use runtime expressions, not tag. So you have to do the include with
<jsp:include page="<%= HelloForm.getTarget() %>" />
Cheers,
evnafets -
How to use HTML Tags in Smartforms
Hi,
Can you please help me out in knowing how to use HTML tags in Smartforms,
suppose i want to display some text in BOLD i should use the tag </b> as shown
</b> Header Information <b>
regards
RanveerHi Ranveer ,
check this following links,
hope this wil helps you
<a href="http://sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/smartforms/smartform%20in%20abap.pdf">check this link,to know abt HTML in smartforms</a>
rgds,
shan -
How to use session object in jsp
hi all
marry christmas
can anyone plz tell me how to use session obect in jsp
rachna
Message was edited by:
rachna_arora82hi rachna,
JSP has a default(implicit) session object...... use the getSession(true) method on the session object and then going u can either get or set attributes depending on the requirement
That was in general and now with the issue u have got..... what u can do is that the u can create session for every user who logs in and when he/she tries to login again then u can probably check for the existing session object in the JSP and perform the logic as required..... any clarifications plzzzzzzz let me know
Thanks n Regards
Naveen M
Message was edited by:
Novice_inJAVA
Message was edited by:
Novice_inJAVA
Maybe you are looking for
-
How to convert an ABAP Query into a report?
Hi .. My requirement is that I need to replace an existing query with a new ABAP report.Is there any formal way to do the same? I am looking for all pointers in this regard. Thanks, Kranti
-
Hi Experts, I have a requirement to attach a pdf file. I refered to the blog below . How to send any data (even binary) through XI, without using the Integration Repository How to send any data (even binary) through XI, without using the Integration
-
Is it possible in oracle?(need very badly)
Hi, I need to write a select statement for a report and i need to check with previous record. here I'm giving the data and table structure also. conditions are : seltest is variable in there we have to show Y Or N extension is null and service center
-
New Tab on header level for me21n/me22n/me23n
Hi Friends i have created a new tab on the me21n/me22n/me23n header level using the exit MM06E005 , The tab is displayed but i am not unable to udate the records into the EKKO Table whereas i have added my field in the include of EKKO CL_EKKODB K
-
How to get ArrayCollection length in initial function?
Hi, I am working for conver Application form Flex 2 to Flex 3. I have the following code,I can see in the dataGrid and ArrayCollection length in the label "loopNumber",but why I can not get ArrayCollection length in initPage() for Flex 3 and the loop