Search Results

Search found 7465 results on 299 pages for 'jsp tags'.

Page 1/299 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • passing valus to one jsp page to another jsp page

    - by devuser
    I'm retrieving values from database to table in jsp.(to a column) I want to insert that value into another table in database. To do that i'm using another jsp table to insert that value in db and i call that jsp page in my previous jsp's page form action tab. I use request.getParameter() method to get the values in my first jsp page to new jsp page.but i couldnt get that values using request.getParameter(). How can i solve this

    Read the article

  • Java (JSP): repeating the contentType header in a "sub-jsp"

    - by Webinator
    What happens when headers are repeated in a .jsp you include in another .jsp? For example if example.jsp starts with this: <?xml version="1.0" encoding="UTF-8"?> <jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page"> <jsp:directive.page contentType="text/html; charset=UTF-8" /> <div class="content"> <jsp:include page="support-header.jsp"/> ... (it includes support-header.jsp) And then support-header.jsp starts also with this: <?xml version="1.0" encoding="UTF-8"?> <jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page"> <jsp:directive.page contentType="text/html; charset=UTF-8" /> ... Is that a problem? Is it bad practice? What does concretely happen when you repeat several times a header that only corresponds to one header in the resulting .html page?

    Read the article

  • Lightning fast forum based around metadata / tags? [closed]

    - by Dan W
    Possible Duplicate: What Forum Software should I use? I wonder if anything like this exists. I'd like to add a forum to my site, but instead of the usual forum/subforum/sub-subforum structure, I'd like to use a metadata/tag approach where everything exists as a single directory, and where there's a search field at the top which instantly (<0.5 sec) filters the threads to a particular keyword or keywords. Also, as the admin, I would be able to add highly visible buttons at the top, which can be clicked on for the main categories I choose for the forum (nevertheless, users can also add tags to their own threads outside of these default main tags I supply if they wish). This approach, if done properly, is more powerful, efficient, maintenance free, scalable and friendly than a standard forum, so I was hoping someone had the same idea and made something out of it. It couldn't be that hard. I'd want the speed to be up to (or near) the standard of this: http://forum.dlang.org/ Other forums (e.g.: phpBB) are orders of magnitude worse than that in terms of latency (posting or browsing), and I think that is wrong, even in principle ;)

    Read the article

  • Strip tags (with tags inside attributes and nested tags) using javascript

    - by Kokizzu
    What the fastest (in performance) way to strip strings from tags, most solution i've tried that uses regexp not resulting correct values for tags inside attributes (yes, i know it's wrong), example test case: var str = "<div data-content='yo! press this: <br/> <button type=\"button\"><i class=\"glyphicon glyphicon-disk\"></i> Save</button>' data-title='<div>this one for tooltips <div>seriously</div></div>'> this is the real content<div> with another nested</div></div>" that should resulting: this is the real content with another nested

    Read the article

  • JSP Include: one large bean or bean for each include

    - by shylynx
    I want to refactor a webapp that consists of very distorted JSPs and servlets. Because we can't switch to a web framework easily we have to keep JSPs and Servlets, and now we are in doubt how to include pages into another and how to setup the use:bean-directives effectively. At the first step we want to decouple the code for the core-actions and the bean-creation into servlets. The servlets should forward to their corresponding pages, which should use the bean. The problem here is, that each jsp consists of different sub- and sub-sub-jsp that are included into another. Here is a shortend extract (because reality is more complex): head header top navigation actionspanel main header actionspanel foot footer Moreover each jsp (also the header and footer) use dynamic data. For example title and actionspanel can change on each page-reload or do have links and labels that depend on the processing by the preceding servlet. I know that jsp-include-directives should only be used for static content und should be avoided for dynamic content. But here we have very large pages, that consist of many parts. Now the core questions: Should I use one big bean for each page, so that each bean holds also data for header and footer beside its core data, so that each subsequent included jsp uses the same bean-directive? For example: DirectoryJSP <- DirectoryBean CompareJSP <- CompareBean Or should I use one bean for each jsp, so that each bean only holds the data for one jsp and its own purpose. For example: DirectoryJSP <- DirectoryBean HeaderJSP <- HeaderBean FooterJSP <- FooterBean CompareJSP <- CompareBean HeaderJSP <- HeaderBean FooterJSP <- FooterBean In the second case: should the subsequent beans be a member of the corresponding parent bean, so that only the parent bean is attached as attribute to the request? Or should each bean attached to the request?

    Read the article

  • Accessing Request object from custom JSP tags

    - by Byron
    I'm trying to make a set of custom tags that encapsulate form elements (markup and validation). There's a method given to retrieve the "Out" object easily: JspWriter out = getJspContext().getOut(); However I can't figure out how to get the request object. I want to be able to directly access the submitted form values from within the Tag class so that I can validate each field. The documentation is quite sparse, so I thought maybe I could use the JspContext object to somehow get the request attributes. But I don't understand the different scopes. System.out.println(getJspContext().findAttribute("field1")); always prints "null". Enumeration e = getJspContext().getAttributeNamesInScope(1); Looping through and printing out the enumeration just gives me a list of classes that don't exist: javax.servlet.jsp.jspOut javax.servlet.jsp.jspPage javax.servlet.jsp.jspSession javax.servlet.jsp.jspApplication javax.servlet.jsp.jspPageContext javax.servlet.jsp.jspConfig javax.servlet.jsp.jspResponse javax.servlet.jsp.jspRequest So is this even possible? If not, could anyone point me to a tag library that deals with form display and validation? I searched the internet for a couple hours and it seemed every single one was discontinued and I couldn't download them. Either that or suggest a better alternative for handling forms.

    Read the article

  • Smarty: Tags Matching and Unpaired Tags Errors

    - by Martin Fousek
    Hello, today we would like to show you other improvements we have prepared in PHP Smarty Framework. Let's talk about highlighting of matching tags and error reporting of unpaired ones. Tags Matching Some of your enhancements talked  about paired tags matching to be able to see matching tags at first glance.We have good news for you that this feature you can try out already in our latest PHP Development builds and of course later in NetBeans 7.3. Unpaired Tags Errors To make easier detecting of template syntax issues, we provide basic tags pairing. If you forgot to begin some paired Smarty tag or you end it unexpectedly you should get error hint which complains about your issue. That's all for today. As always, please test it and report all the issues or enhancements you find in NetBeans BugZilla (component php, subcomponent Smarty).

    Read the article

  • Are JSP and Java still relevant?

    - by dyyyy
    I've been working so long in java and jsp, that for me it's a no-brainer to use it. But now as I'm starting to do my own framework for web applications, I'm wondering if jsp is the right choice. Seing how much php is popular (as well as other languages as ruby and python) Is JSP still a relevant language. Does it have any clear advantage over other languages ? I don't want to use it just because i know it better. So please considering I know nothing, is there a reason to use JSP and JAVA? Thank you

    Read the article

  • Evaluate dynamically constructed JSP at runtime

    - by Sandy
    I have a requirement where in the JSP page itself is created by the user and stored in the database. When viewing results we need to render this JSP to the client, evaluating all tags inside this JSP. I am aware that it is doable as OpenCMS and Blogger both implement this functionality. But, I just can't find the right way. Any pointers on how to do this? [Added] Note: I cannot write a temporary file on disk for the purpose :(

    Read the article

  • Enabling tag libraries in jsp

    - by noam
    I feel like I am missing something - from what it seems, jsp comes out of the box with support for tags, as this question's answer shows (the guy was asking a pure-jsp question and got an answer involving tags). But if I try to run the given code <c:out value="${myString}"/> (with myString defined before, of course), the jsp just writes the above line into the html. Do I have to do something extra to enable it?

    Read the article

  • doubt in JSP:Include

    - by raja
    Hi All: I have added a code which will include child jsp using jsp:include. The problem i am facing is that the code present in child code is not executing. Below is the code iam using it now JSPF File: <jsp:include page="X.jsp" flush="true"> </jsp:include> the above code is present in a file named "A.jspf" which is included in another jsp file named "Parent.jsp". X.jsp: <%@ page import="java.util.*" %> <% System.out.println("********Child JSP"); %> Whenever i execute the parent file "Parent.jsp", all the other contents given in Parent.jsp and A.jspf is displaying except the content present in X.jsp. No error is displaying. Both X.jsp and A.jspf are present in same folder only. Please help me to resolve this issue. Thanks in advance.

    Read the article

  • Passing Textbox values from one JSP to another JSP

    - by Malathy
    hi all. I want to pass a textbox value from source JSP file to the destination JSP file on a href click event withour using javascripts. can anyone help me out in this? i tried using the following method but iam getting error like "End tag is required" <a href="/destinationFile.jsp?sDate=<%='+txtDate.value+' %>"> thanks in advance Malathy.L.

    Read the article

  • Phishing attack stuck with jsp loginAction.do page?

    - by user970533
    I'm testing a phishing website on a staged replica of an jsp web-application. I'm doing the usual attack which involves changing the post and action field of source code to divert to my own written jsp script capture the logins and redirect the victim to the original website. It looks easy, but trust me, it's has been me more then 2 weeks and I cannot write the logins to the text file. I have tested the jsp page on my local wamp server it works fine. In staged, when I click on the ok button for user/password field I'm taken to loginAction.do script. I checked this using the tamper data add-on on Firefox. The only way I was able to make my script run was to use burp proxy intercept the request and change action parameter to refer my uploaded script. I want to know what does an loginAction.do? I have googled it - it's quite common to see it in jsp application. I have checked the code; there is nothing that tells me why the page always points to the .do script instead of mine. Is there some kind of redirection in Tomcat? I like to know. I'm unable to exploit this attack vector? I need the community's help.

    Read the article

  • Difference between $ and # in ADF/JSF/JSP

    - by pavan.pvj
    Found this one interesting. So, picked it from one of the books and posting here.JSP 2.1 and JSF 1.2 - both of them use a unified Expression language. One major and the most obvious difference is between $ and #. JSP 2.1 uses $ and JSF 1.2 uses # in an EL. $ - immediate evaluation# - deferred evaluation$ - $ syntax executes expressions eagerly/immediately, which means that the result is returned immediately when the page renders.# - # syntax defers the expression evaluation to a point defined by the implementing technology. In general, JSF uses deferred EL evaluation because of its multiple lifecycle phases in which events are handled. To ensure the model is prepared before the values are accessed by EL, it must defer EL evaluation until the appropriate point in the life cycle.Note: This is picked up from Oracle Fusion Developer Guide (ISBN: 9780071622547). There is also a very good article here:http://java.sun.com/products/jsp/reference/techart/unifiedEL.html

    Read the article

  • JSP Custom Tag Library vs JSP2 Tag Files

    - by Vinayak.B
    Can anybody gimme the idea about the JSP custom tag library and the JSP 2 Tag files.. Are this two are alternatives to use....??? If there is any comparision(or merits and demerits) among this please do specify.. And which one of this is better to work with.. I m waiting for the kind suggestions.. Regards, Vinayak

    Read the article

  • Uploading a zip file to a jsp and extract the content in another jsp

    - by sunnyj
    I want to upload a zip file in a jsp page and the user is sent to another jsp page after he selects and uploads the file. In this second page I want to 1.)extract the uploaded zip file. 2.)read some content from the extracted file(s) and allow the user to change/edit them 3.)save the user changes in the files. 4.)zip the files again and save it in another destination. Please suggest me a rough outline of a solution as I am stuck in the phase in which I get the uploaded file and re-direct the user to the second jsp.

    Read the article

  • JSP: accessing enum inside JSP EL tags

    - by Arjun
    My java enum looks like this: public enum EmailType { HOME, WORK, MOBILE, CUSTOMER_SERVICE, OTHER } In JSP, I am trying to do sth like below, which is not working. <c:choose> <c:when test="${email.type == EmailType.HOME}">(Home)</c:when> <c:when test="${email.type == EmailType.WORK}">(Work)</c:when> </c:choose> After googling, I found these links: Enum inside a JSP. But, I want to avoid using scriplets in my JSP. How can I access the java enum inside EL tag and do the comparision?? Please help.

    Read the article

  • wordpress backend: retrict post tags to site tags only

    - by Richard
    In the post screen, I want to remove the option of multi-authors being able to 'free tag' their posts. In other words, only allow tags that have been preset in the admin tags section.(these tags are of course visible in the tag cloud in posts screen) The concept is to prevent authors introducing random tags in their posts, leading to duplication and confusion.

    Read the article

  • java - useBean in jsp and getAttribute in jsp but NULL

    - by ravi parekh
    user is null in servlet. Pls let me if doing mistake. i m trying to get all html element in bean rateCode.jsp **<%@page import="com.hermes.data.RateCode_" %>** <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Rate Code</title> </head> <body> **<jsp:useBean id="user" class="com.hermes.data.RateCode_" scope="session" > <jsp:setProperty name="user" property="*"/></jsp:useBean>** <form id="f_rateCode" action="/ratePromoCodes" method="post" > <table align="center" border="1" cellspacing="0"> <tr> <td colspan="2" align="center" class="header">Rate Code Administrations</td> </tr> <tr> <td align="right" style="border-style: solid;">Rate Code:</td> <td align="left" style="border-style: solid;"> <input type="text" id="code" name="code" value="${user.code}" size="10" maxlength="32" style="width: 100px"/> </td> </tr> <tr> <td align="right" style="border-style: solid;">Rate Description:</td> <td align="left" style="border-style: solid;"> <input type="text" id="description" name="description" value="<%=user.getDescription()%>" maxlength="128" size="40"></td> </tr> <tr><td><input type="submit" value="ok" /></td> </tr> </table> </form> Servlet - ratePromoCodes protected void doPost(HttpServletRequest req, HttpServletResponse resp) { RateCode rc = (RateCode) req.getAttribute("user"); Enumeration an = req.getAttributeNames(); Enumeration pn = req.getParameterNames(); Object o = null; while (an.hasMoreElements()) { o = an.nextElement(); System.out.println(o); } while (pn.hasMoreElements()) { o = pn.nextElement(); System.out.println(o); } } RateCode.java (javaBean) public class RateCode_ { private String code ; private String description; public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } }

    Read the article

  • Are Meta tags useful for SEO?

    - by Lynda
    Reading a Search Results with this or a similar phrased question can lead to reading a lot of conflicting answers. Are there any meta tags that matter in SEO? From what I have read I do know that meta keywords are no longer used (or so little it is not worth using them) and don't worry with using them. Meta Description tags are not used for page ranking but can effect click through rates so should be used but be less than 160 characters. I know the following meta tags exist: author - the author's name and possibly email address robots - to allow or disallow indexing by robots copyright - the copyright date of the page How much do these meta tags matter and are there others that are new (including ones that may not be used by all but might be used in the future or are used by only one of the big players like Google or Bing) meta tags that should be included? Note: Even if a meta tag doesn't matter in SEO but helps with click through rates similar to the descript tag does then feel free to include it with your answer.

    Read the article

  • Checking attribute exists in JSP

    - by Javi
    Hello, I have some classes which extends a superclass, and in the JSP I want to show some attributes of these classes. I only want to make one JSP, but I don't know in advance if the object has an attribute or not. So I need a JSTL expression or a tag which checks that the object I pass has this attribute (similar to in operator in javascript, but in the server). <c:if test="${an expression which checks if myAttribute exists in myObject}"> <!-- Display this only when myObject has the atttribute "myAttribute" --> <!-- Now I can access safely to "myAttribute" --> ${myObject.myAttribute} </C:if> How can I get this? Thanks.

    Read the article

  • JSP tag lifecycle

    - by mkoryak
    i just introduced a bug into my code because i seem to have misunderstood the jsp tag lifecycle. The tag worked like this before the bug: i pass the tag some collection as an attribute, and it displays it as a table. The collection was passed into the JSP from the controller. after the bug: a removed the attribute which set the collection. instead, in the tag i check if the collection is null, and then grab it by name from the request (using a naming convention). the thing that i didnt expect: after the collection was initially set in the tag, it would never become null on subsequent executions! it was still defined as an non-requred attribute in the TLD. I expected the tag to not hold on to previous values between executions.

    Read the article

  • Java (JSP/Servlet): equivalent of getServletContext() from inside a .jsp

    - by Webinator
    How should I access the ServletContext from a .jsp? For example, how can I call the getRealPath method from inside a .jsp. Here's a Servlet, which works fine: protected void doGet( HttpServletRequest req, HttpServletResponse resp ) throws ServletException, IOException { resp.setContentType( "text/html; charset=UTF-8" ); final PrintWriter pw = resp.getWriter(); pw.print( "<html><body>" ); pw.print( getServletContext().getRealPath( "text/en" ) ); pw.print( "</body></html>" ); pw.flush(); pw.close(); } Now I'm looking for the exact line I'm supposed to insert in the following .jsp to do exactly the same thing as the servlet above is doing. <%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <body> ... // What should I insert here </body> </html>

    Read the article

  • Java: attributes order in .jsp getting inversed

    - by NoozNooz42
    Every single time I've read about the meta tags, the attribute where in this order for the description: <meta name="description" content="..." /> First name, then content. It's also like that in the Google Webmaster documentation. Basically, it's like that everywhere. Now in a .jsp (in XML notation) I've got the following: <meta name="description" content="${metadesc}"/> So it's name first, then content. Yet on the generated webpage, I get this: <meta content="...(200 chars or so here making it a very long line)..." name="description"/> Somehow the attributes have been inversed. Because the content follows the official W3C and Google recommendations, the content is a bit less than 200 characters long, which makes it a major pain to "visually verify" that the name attribute is correctly there (I've got to scroll). Anyway... Why are these attribute not appearing in the order defined in the .jsp? Can I force them to appear in the same order as I wrote them in my .jsp? I realize the resulting tag may be valid... But I can also imagine a lot of very creative ways to have valid tags which users would be very upset about. Does this make any sense to inverse these attributes? EDIT wow, just wow... If I invert the attributes in my .jsp (that is, writing them in the "wrong" order), then they appear as I want them to appear in the generated web page. (Tomcat 6.0.26 btw)

    Read the article

  • WebSeal and jsp content updated by Ajax

    - by lior chaga
    Hey, I have a problem running an application on environment with WebSeal. It is a web application with Java server that contains many parts that are replcaed within the page according to user input. For instance - a form called Outer.jsp may contain a form:options combo-box (by spring-forms), that uppon selection of an option, a certain Div is updated with a content produced by a jsp and fetched by an Ajax call (the ajax impementation in the client is done by Prototype JavaScript framework 1.5.1.2). Let's call the content fetched by ajax - Inner.jsp So Outer.jsp is fetching Inner.jsp, which in turn uses js functions in files included by the Outer.jsp. This, I think, is where my problem starts - Inner.jsp is not familiar with any of the functions included in Outer.jsp. And so, almost any operation performed by Inner.jsp is failing miserably. Needless to say - this works perfect when running on environment without WebSeal. Note that the scripting is enabled in WebSeal junction (with the -J option). I also see that the content returned by the Ajax call includes a document.cookie added by WebSeal (not sure it matters to this problem) Can anyone assist? Thanks! Lior

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >