tag 1 « Tag « JSP-Servlet Q&A





1. Importing JavaScript in JSP tags    stackoverflow.com

I have a .tag file that requires a javascript library (as in a .js file). Currently I am just remembering to import the .js file in every JSP that uses the tag ...

2. JSP-tags with static output    stackoverflow.com

I am considering creating some JSP-tags that will always give the same output. For example:

<foo:bar>baz</foo:bar>
Will always output:
<div class="bar">baz</div>
Is there any way to get a JSP-tag to behave just like static output ...

3. Using JavaScript within a JSP tag    stackoverflow.com

I've seen this question regading the importing of js-files related to the tag content itself. I have a similar problem, here I have a jsp tag that generates some HTML ...

4. how to set default location in browse tag    stackoverflow.com

Am doing project in j2ee.I use Browse button. I need to fetch images/files from a folder inside my project folder, everytime.I wish to set my project's folder name as a default ...

5. windows authentication    stackoverflow.com

Using a JSP page I get username and password. How do I check this in active directory. Please give example with some code.

6. Difference between JSP1.2 and JSP2.0    stackoverflow.com

Difference between JSP1.2 and JSP2.0

7. How do I access the root of a WAR?    stackoverflow.com

I need to determine if an image exists in a JSP tag so I can display a default if it doesn't exist. What is the best way to access the War ...

8. Problem with HTML output in JSP    stackoverflow.com

I have code which generates some HTML, but when I try to output this content in a jsp all '<' are replaced with '&lt;' and all '>' with '&gt;'. Here is ...

9. How to map a class to a jsp tag?    stackoverflow.com

I see some program, in its jsp code, it has following : And it will be mapped into a class. When you put some database object into this tag, it will automatically loop ...





10. jsp tag without java code    stackoverflow.com

hi all i just want to create a simple jsp tag such as :

abc.tag

<div>
    <table>
        ....
    </table>

   ...

11. How to test JSP TagExtraInfo?    stackoverflow.com

I consistently have troubles getting my TagExtraInfo implementations to work properly. I have one implementation that works, and one that doesn't and I unable to see the difference between the two. ...

12. JSP for setting the BASE HTML Tag    stackoverflow.com

I am running an application using jsp (gsp actually) under Tomcat. All URLs are absolute. That is, every href begins with a "/". For example:

<a href="/mytool/role/index" class="menulink">Role</a>
Every request will receive a parameter called ...

13. can i insert my own option in select tag    stackoverflow.com

which tag to use if i want to select an option from dropdown as wel as i can insert my own option. using jsp can i do it? i m able to ...

14. How to use JSP tags in JavaScript?    stackoverflow.com

How to use JSP tags in JavaScript file? Is there any way?

15. What is a JSP tag?    stackoverflow.com

I'm coming from a .NET background and trying to learn Java. I keep seeing references to tags and tag handlers, etc. Is there an equivalent .NET construct?

16. calling method of class in jsp using jsp tags    stackoverflow.com

Class Foo
{
   public String currentVersion()
   {
     return "1.2";
   }
}
need to call currentVersion class method from jsp using tag library? where currentversion ...





17. FatWire ContentServer and Web Services    stackoverflow.com

Greetings, I am working with a FatWire CS, and need to incorporate Web services. FatWire has tags for this, but the previous devs on this system chose to build a homegrown solution ...

18. Is there any good reason to use false in JSP tags?    stackoverflow.com

Is there any good reason to disallow scriptlet or EL expression to be inserted as attribute value? Let's say we have tag:

<tag>
    <name>mytag</name>
    <tag-class>org.apache.beehive.netui.tags.tree.Tree</tag-class>
   ...

19. Java webapp: where/how to automatically set each picture's width/height    stackoverflow.com

For several reasons, a lot of "webmaster guides" (like Google and Yahoo!'s webmaster guides/guidelines) repeats several times that it is better to always put the width and height attribute of the ...

20. How can I figure out the name of a JSP tag in Java?    stackoverflow.com

Currently I have the following code:

Tag tag = getParent();

while(tag != null) {
    parents.append("child of ")
           .append(tag.getClass().getName())
   ...

21. Java generics: get class of generic method's return type    stackoverflow.com

Background

I once wrote this method:
private <T> SortedSet<T> createSortedSet() {
  return new TreeSet<T>();
}
It's supposed to be called like this:
Set<String> set = createSortedSet();
This works fine (although I've seen in answers here when ...

22. PrettyTime JSP tag    stackoverflow.com

I'm trying to put PrettyTime into JSP as a tag. Found this page - http://www.ke-cai.net/2010/03/formatting-time-with-prettytime-jsp-tag.html - as the only source of the tag. But I've never used Maven, so ...

23. How can I call a class inside tags    stackoverflow.com

My code in my JSP is something like this:

<tag:loggedin>
    <a href="./logout">logout</a>
</tag:loggedin>
How can I call a class or put scripting code inside tags when I can't use <% scripting ...

24. changing openlayers clutter radius    stackoverflow.com

I used openlayers clustter strategy to cluster a dataset from a geoserver. I used the following code in styling of clusters.

var myStyle = new OpenLayers.Style( {
       ...

25. how to get localfile using iframe tag    stackoverflow.com

i'm trying to get the flash file which is in previous directory with iframe tag.But it's not working.Can anyone help me to solve this. Below is code

 <iframe src="../courses/slide1.swf " frameborder="0" ...

26. incorrect username and passwords    stackoverflow.com

why does the following code display an error even when the correct password is entered?

try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection("jdbc:odbc:mydsn","sa","password@123");
String sql = "select customer_id, fname, lname, email_id, phone_number from customer_details where user_name=? ...

27. Jersey with JSPs, without tags    stackoverflow.com

I am using Jersey to do the URL binding for my web application. Hence, I am using it as a very simple MVC. I can manage to have Jersey return my ...

28.  tag in html    stackoverflow.com

I have the following code in a JSP file:

rs=stmt.executeQuery("select * from routemaster");
if(rs!=null){
   %>
   <table class="notebook" align="center">
   <tr class=row_title>
   <th class=row_title>RouteID</th>
   <th ...

29. Adding
 causes table cell to BLOW UP?    stackoverflow.com

im using "pre" tags in order to allow a textarea box to pass over newlines because Im stripping html out the form when its subitted. The problem is with adding ...

30. Can JSP tags be used in JavaScript?    stackoverflow.com

I'm building some HTML in JavaScript to be passed back to a JSP and I was doing this:

var html = "<td id='comment-" + comment.id + "'class='wrappable' style='width:400px;'>"
    + ...

31. Dealing with     stackoverflow.com

Here is my question: when loading the Dropdowns dynamically using in JSP how to select a option by default. here is my code,

<html:select property=�menu� >
       ...

32. Could not find the main class: org.netbeans.modules.web.project.ant.JspCSingle. Program will exit    stackoverflow.com

I have tried again my jsp coding with taglid. This time round, everything seems to work except when I run it, the following error appears: java.lang.NoClassDefFoundError: org/netbeans/modules/web/project/ant/JspCSingle Caused by: java.lang.ClassNotFoundException: org.netbeans.modules.web.project.ant.JspCSingle ...

33. Jsp tag confusions    stackoverflow.com

i am new to jsp, I am currently studying an example i got from online. some tags confused me.

<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%> 
<html>
<head>
    <link href="<s:url ...

34. scopes in JSP tags    coderanch.com

35. JSP Tag Questions    coderanch.com

The following line works with Tomcat (inside of Jetspeed) but I tried to import it into Weblogic and it did not work. The prefix is jsp right? But I never did a declaration like this... <%@ taglib uri="jsptags.tld" prefix="jsp" %> And it still worked. I wouldn't know what to put if I had to do a declaration.

36. interface tag    coderanch.com

37. problem with jsp : forwar> tag(please help)    coderanch.com

I am doing a project in which i have developed a search page which returns the search results(i.e various products), now from this page i have a facility to compare the various products, once the user selects the products to be compared & clicks a compare page, a comparisionPage.jsp is forwarded (using tag) which will display comparision of different ...

38. DataWebBean tag in JDev9i    coderanch.com

I'm trying to locate more detailed information for using this tag. In JDev 3.2, this was jsp:usebean. Well things have changed. The help documentation within JDev9i is less than helpful. There may not be info considering that JDev9i(cand.2) isn't even released yet. Has anyone worked with this tag or come across helpful info for using the tag? I am trying to ...

39. JSP Tag Problem    coderanch.com

Hi All I am having problem wiht my jsp page when i try to dispaly values using tag. I am trying to retrieve values from db2, which is "Rashmi" for instance and in jsp i am assinging that value in value Tag. Take a look at the following code: "> Now in above code ...

40. Problem with Hello JSP tag...    coderanch.com

Hi guys, i have been trying to crack a HelloWorld tag for a couple of nights now. I have just installed Tomcat 4.0.3,the installation was OK , i can start and stop and access localhost:8080 I have abided by the directory structure given in JSP Tag Lib Book(Gal Shachor etal) and find out you will end up with two WEB-INF folders ...

41. Tag Extensions (user defined html tags)    coderanch.com

Hi all, Has anyone developed user defined html tags like form, input, select, body etc.. and used them in their JSP pages? I have downloaded the jruntags.jar file from JRun which has all the tag handler classes needed for user defined html tags. I tried to make my own but it is not working. If anyone has done it successfully ,please ...

42. using tag extensions    coderanch.com

43. Tag Extensions -URGENT    coderanch.com

44. which tag is invoked?    coderanch.com

45. confused about jsp property tags    coderanch.com

hi ia m a little confused about the jsp property tags in particular When do we use the wild card'*'and what design benefits does it hold? in the book ProfessionalJSP,(pg 182) in chap 5 they have a example about friuts to demonstrate the use of the above tag. i don't understand why we need to use redundant values there. ...

46. Jsp tag for creating an HTML table    coderanch.com

47. Tag for HTML table    coderanch.com

Originally posted by Pradeep Bhat: Hi, I just browsed through the list of JSTL tags. I was bit surprised that I did not see any tag for dynamic HTML table creation. This is a common requirement for many project for example displaying account transaction. How come JSTL missed this important tag? JSTL is intentionally not HTML-specific. There's really no way to ...

48. Wronx JSP Tag Librarys    coderanch.com

From the amazon review it seems that the book does not go into to much detail on 3rd party taglibs but rather puts the focus on creating your own tag libs. I have also been very impressed with all of the WROX books and would love to get a look at this one!

49. Tag Usage    coderanch.com

Hi Guys !!! I just wanted to inquire whether it would be a good idea to use tags to create tags to incorporate client side validation. If yes, then would it mean that the entire set of form element tag(s) would need to be created. For instance creating your own form tag instead of the default. How would it be ??? ...

50. jsp-tag inside html not working???    coderanch.com

51. Simply printing HTML tag on JSP    coderanch.com

52. Repeat Tag    coderanch.com

Hello, I am hoping I am putting this in the correct forum. If I am not I appologize. I am using WebSphere's tag and I want to know how it works. The way I am using it is as follows: The property="begin" sets an array index to zero and ...

54. JSP Tag Libraray....    coderanch.com

55. JSP Tag    coderanch.com

The Primary benefits are related to maintainability and usability. If you code a piece of functionality into a tag then you can very easily reuse this across multiple pages and even multiple web applications. This is much harder with scriptlets. Scriptlets create messy pages. You dont have any separation of concerns, with the display and logic mixed up together, this results ...

56. Changing line alternate line color using tags    coderanch.com

Does anyone have an example of how you would use custom tags to change the line color in a table of results, so that its a bit clearer where one line ends and another begins. I don't know if i've made myself very clear. For example, if i had a table with 10 lines of information i want the 1st line ...

57. Problem with JSP tags on OC4J Version 903......    coderanch.com

Hello guys, i have deployed and run a chart rendering java web application successfully in Tomcat 4.0 , but after deploying on OC4J , i was able to get the first screen. But, on clicking on a link which forwards to a JSP(which renders a bar chart ,using custom tags ),i got the following error . Is this familiar ? Does ...

58. JSP tags retaining previous data    coderanch.com

60. Tag calss    coderanch.com

People, I have a working jsp which I am trying to split using custom tags. Each related functionality goes into a tag. This is kind of basic... I have a method which is called by only one tag class. Can I write this method in that custom tag class? I mean can a tag class have methods other than doStartTag and ...

61. Tag Behaves Differently than Std Class    coderanch.com

62. help on c:import tag problem    coderanch.com

Hi all, I am trying to use the c:import tag, i have set up the configuration in tomcat 4.0.3 with whatever instructions the JSTL said. Here is the jsp code: <%@ page import="java.net.*" %> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> Basically i want to access the files from different servers and machines in my JSP . jsp:include only looks ...

63. problem in tags,please help!!!    coderanch.com

You may getting error do to tld cannot find by JSP.I am not find any error in class and tld file created by you.I work on Tag library in Apache-Tomcat enviroment so I may wrong. I do it as 1. Create a tld file 2. Create a handler (classess) 3. Modify the Web.xml (include the tld file location) 4. restart the ...

64. help with tags    coderanch.com

65. Good ways for JSP + tags    coderanch.com

66. Tag Lig Question    coderanch.com

So I've decided to create a JSP tag library to encapsulate my persistence engine. This excites me, because now my Data Beans can be used anywhere -- swing, (BMP) EJBs, JSPs, etc., and go through the same set of code to persist themselves. But Tag libs are something I'm just starting to muddle though. The on-line tutorials are OK, but somewhat ...

67. opensource Grid Tag    coderanch.com

68. Pager Tags Newbie    coderanch.com

69. Phone number formatter tag    coderanch.com

70. JSP tag?    coderanch.com

72. Making tags easier    coderanch.com

73. JSP Tags    coderanch.com

Hi , I want to display product prices on JSPs. This is how the prices are displayed: If the current price of the product is less then the base price then display the base price striked out and the current price in red. Otherwise display the price as normal. This has to be done on several pages. There is approx 10 ...

74. JSP Tags    coderanch.com

I have written a custom tag handler which extends from TagSupport class. I see that the doStartTag() method can return one of the two : SKIP_BODY or EVAL_BODY_INCLUDE. But what i want to do is to process the body but not include it in the output. If I use SKIP_BODY the content of the body wont be processed and if I ...

75. JSP simple tag problem    coderanch.com

76. Problem using core tags    coderanch.com

77. Tag question    coderanch.com

78. spotlight tag    coderanch.com

79. delete tag    coderanch.com

Hi Vicneswaran Boi, Welcome to JavaRanch! Your first problem here is that you're using executeQuery() for a DELETE statement. Obviously a DELETE doesn't return a ResultSet, hence your error. Look at executeUpdate() instead. You will also probably need to change "DELETE * FROM" to "DELETE FROM" unless the database you're using is non-standard. Note also that you shouldn't be using the ...

80. Select tag    coderanch.com

81. Customised Tag    coderanch.com

82. JSP Tags - Help!    coderanch.com

83. Tag reuse by server.    coderanch.com

private int i = 0; public int doStartTag() throws JspException { try { pageContext.getOut().println(i++); } catch (IOException e) { e.printStackTrace(); } return EVAL_BODY_INCLUDE; } Would provide a sort of counter upon each refresh. I was under the impression that tags would not keep this information. If I were to set an internal variable with a user's private information, would this mean ...

84. javascript and netui tags    coderanch.com

Hi, I am creating a page using weblogic. As part of the pageFlow scope I have declared a Map called countries. These are country names keyed on the country code. In the page I display the list of countries using: I want to use Javascript that sets another field wiht the country code whenever a country is ...

85. Execute code on tag closure?    coderanch.com

86. Compiling Tags    coderanch.com

87. how to run a tag program    coderanch.com

hello sir i m new to tag libraries .......... i have write one file .......... tag.jsp <%@ taglib uri = "/taglib.tld" prefix="nt" %> then i write ........ taglib.tld 1.0 1.1 nt Hello World che empty then i write .,,,,,,, che.jsp ...

88. c:set tag    coderanch.com

89. A simple JSP tag question    coderanch.com

90. jsp tree tag component ?    coderanch.com

91. JSP tags    coderanch.com

92. Tag, you're it.    coderanch.com

93. [meta http-equiv] tag    coderanch.com

In my JSP, if I use , then according to html spec, the *servers* will create a corresponding header in the http response message. In this case, I would expect the response header would have an extra header called 'Refresh' along with other headers like Content-type, Content-length, set-cookie, etc. This would just like calling response.addHeader(".."). I tried this with Tomcat ...

94. JSP Tag that contains result of another    coderanch.com

95. JSP Tag that contains result of another    coderanch.com

96. tag with xdoclet    coderanch.com

97. x:transform tag    coderanch.com

hi, i'm just about to start work on a site for a client. they want it written in jsp, using xml/xslt transformations to generate page content. As the site is just brochure-ware requiring nothing complex i was thinking about implementing it all using jsp, without any sort of mvc framework such as spring or struts. I was planning to use the ...

98. java code using prize Tags    coderanch.com

99. Problem with jsp:setAttribute tag    coderanch.com

100. jsp isError tag    coderanch.com