Search Results

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

Page 20/299 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • How can I close the output stream after a jsp has been included.

    - by stu
    I have a webpage that makes an ajax call to get some data. That data takes a long time to calculate, so what I did was the first ajax server call returns "loading..." and then the thread goes on to calculate the data and store it in a cache. meanwhile the client javascript checks back every few seconds with another ajax call to see if the cache has been loaded yet. Here's my problem, and it might not be a problem. After the initial ajax to the server call, I do a ...getServletContext().getRequestDispatcher(jsppath).include(request, response); then I use that thread to do the calculations. I don't mind tying up the webserver thread with this, but I want the browser to get the response and not wait for the server to close the socket. I can't tell if the server is closing the socket after the include, but I'm guessing it's not. So how can I forcibly close the stream after I've written out my response, before starting my long calculations? I tried o = response.getOutputStream(); o.close(); but I get an illegal state exception saying that the output stream has already been gotten (presumably by the jsp I'm including) So my qestions: 1) is the webserver closing the socket (I'm guessing not, because you could always include another jsp) 2) if it is as I assume not closing the socket, how do I do that?

    Read the article

  • Impact on SEO of adding categories/tags in front of the HTML title [closed]

    - by Mad Scientist
    Possible Duplicate: Does the order of keywords matter in a page title? All StackExchange sites add the most-used tag of a question in front of the HTML title for SEO purposes. On Stackoverflow for example this is usually the programming language, so you end up with a title like python - How do I do X? This has obviously an enourmous benefit on SEO as the programming language is an extremely important keyword that is very often omitted from the title. Now, my question is for the cases where the tag isn't an important keyword missing from the title, but just a category. So on Biology.SE for example one would have questions like biochemistry - How does protein X interact with Y? or on Skeptics medical science - Do vaccines cause autism? Those tags are usually not part of the search terms, they serve to categorize the content but users don't use those tags in their searches. How harmful is adding tags that are not used in searches in terms of SEO? Is there any hard data on the impact this practise might have on SEO? The negative aspects I can imagine, but have no data to show that it is actually a problem are: I heard that search engines dislike keyword stuffing and this might trigger some defense mechanisms against that It's a practise associated with less reputable sites, a keyword in front that doesn't fit the actual title well might look suspicious to some users. It wastes precious space in the title shown in search results.

    Read the article

  • Appengine not liking my .jspx files

    - by Hans Westerbeek
    I have a little app that runs fine on local dev appengine, but appengine itself is not processing my .jspx files. The jspx files are in WEB-INF so they should not be excluded by appengine (as a static resource) I am using Apache Tiles to define my views. So the html produced looks like this: <html xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:tiles="http://tiles.apache.org/tags-tiles" > <jsp:output omit-xml-declaration="yes"/> <jsp:directive.page contentType="text/html;charset=UTF-8" /> <jsp:directive.page isELIgnored="false"/> (etc etc) How can I solve this problem?

    Read the article

  • any way to use ajax with jstl customtags without duplicating tags in javascript?

    - by CodeMonkeyB
    I am working on a page where part of the content is loaded normally and the pages are rendered using jsps. The product images and links generated on that page are by custom jstl tags. When the user scrolls more products are requested from the server in a JSON response and then using UnderscoreJS templates they are rendered and added to the bottom of the page. Is there any way I can use the JSTL tags in Javascript without recreating them using a javascript function (it won't be possible to re-create all of them in javascript). What is the best way to handle this scenario? I guess I could return a rendered html response for the ajax call, but that would mean I have some ajax requests which use json and some that use rendered html...

    Read the article

  • Why does Tomcat try to use the cache when compilation failed?

    - by etheros
    For some reason, it appears Tomcat is trying to hit its compilation cache when compilation failed. For example, if I create a JSP containing nothing but Hello, <%=world%>!, predictably, I get an error: org.apache.jasper.JasperException: Unable to compile class for JSP. Subsequent requests however alternate between this and org.apache.jasper.JasperException: org.apache.jasper.JasperException: Unable to load class for JSP. Further, if I create a JSP containing Hello!, it of course works just fine. If I modify it contain Hello, <%=name%>!, the response alternates between the previously-mentioned compilation error, and the cached Hello!. What's going on?

    Read the article

  • how find out the form is submit in JSP?

    - by user261002
    I am trying to create a an online exam with JSP. I want to get the questions one by one and show them on the screen, and create a "Next" button then user is able to to see the next question, but the problem is that I dont know how to find out that the user has clicked on the "Next" button, I know how to do it in PHP : if($_SERVER['REQUEST_METHOD']=='GET') if($_GET['action']=='Next') but I dont know how to do it in JSP. Please help me this is piece of my code: String result = ""; if (database.DatabaseManager.getInstance().connectionOK()) { database.SQLSelectStatement sqlselect = new database.SQLSelectStatement("question", "question", "0"); ResultSet _userExist = sqlselect.executeWithNoCondition(); ResultSetMetaData rsm = _userExist.getMetaData(); result+="<form method='post'>"; result += "<table border=2>"; for (int i = 0; i < rsm.getColumnCount(); i++) { result += "<th>" + rsm.getColumnName(i + 1) + "</th>"; } if (_userExist.next()) { result += "<tr>"; result += "<td>" + _userExist.getInt(1) + "</td>"; result += "<td>" + _userExist.getString(2) + "</td>"; result += "</tr>"; result += "<tr>"; result += "<tr> <td colspan='2'>asdas</td></tr>"; result += "</tr>"; } result += "</table>"; result+="<input type='submit' value='next' name='next'/></form>"; }

    Read the article

  • Passing JSP parameter to javascript won't work in IE8!

    - by Ronen
    Could really use with some help here... I've got a servlet that generates an XML string (relatively long) which I then pass to a javascript variable in a forwarded jsp file: $(document).ready(function() { ... var itXML = <% out.print((String)request.getAttribute("xml"));% ; ... } This seems to work just fine in Firefox but when I run the same project on IE8 I get a syntax error for this line. Any Ideas? Thanks!

    Read the article

  • Emacs : problem with tags file ?

    - by KaluSingh Gabbar
    I am using ctags to create tags for my Emacs to read symbols from, using cygwin. Emacs says "visit-tags-table-buffer: File /home/superman/tags is not a valid tags table" here are my options to find files and generate tags. $>find . -type f -regex '.*\.[hc]\|.*\.cpp' -print0 | xargs -0 ctags -e --extra=+q --fields=+fksaiS --c++-kinds=+px --append -f ~/tags

    Read the article

  • I am unsure of how to access a persistence entity from a JSP page?

    - by pharma_joe
    Hi, I am just learning Java EE, I have created a Persistence entity for a User object, which is stored in the database. I am now trying to create a JSP page that will allow a client to enter a new User object into the System. I am unsure of how the JSP page interacts with the User facade, the tutorials are confusing me a little. This is the code for the facade: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Add User to System</title> </head> <body> <h2>Add User</h2> <h3>Please fill out the details to add a user to the system</h3> <form action=""> <label>Email:</label> <input type="text" name="email"><br /> <label>Password:</label> <input type="password" name="name"><br /> <label>Name:</label> <input type="text" name="name"><br /> <label>Address:</label> <input type="text" name="address"><br /> <label>Type:</label> <select name="type"> <option>Administrator</option> <option>Member</option> </select><br /> <input type="submit" value="Add" name="add"/> <input type="reset" value="clear" /> </form> </body> This is the code I have to add a new User object within the User facade class: @Stateless public class CinemaUserFacade { @PersistenceContext(unitName = "MonashCinema-warPU") private EntityManager em; public void create(CinemaUser cinemaUser) { em.persist(cinemaUser); } I am finding it a little difficult to get my head around the whole MVC thing, getting there but would appreciate it if someone could turn the light on for me!

    Read the article

  • mod_rewrite works within directory not on root

    - by Anvesh Saxena
    I am having problem in my RewriteRule for the tags portion. What I am able to debug is that the rule is been triggered at least because the page "tags.php" is been rendered but without the URL parameters. This .htaccess file with the rules is within root for my sub-domain and has following content for tags postion. # Rewrite rule for tags RewriteRule ^tags/(\w+)/(\d+)/?$ tags.php?tag_name=$1&tag_id=$2 RewriteRule ^tags/(\w+)/?$ tags.php?tag_name=$1 RewriteRule ^tags/?$ tags.php?tag_name= Another problem that I ain't able to debug is that the similar .htaccess file exists for a directory within my sub domain and is working as expected with the necessary URL parameters also been available. The .htaccess file within the directory reads as follows # Rewrite rule for tags RewriteRule ^tags/(\w+)/(\d+)/?$ restAPI.php?type=tags&tag_name=$1&tag_id=$2 RewriteRule ^tags/(\w+)/?$ restAPI.php?type=tags&tag_name=$1 RewriteRule ^tags/?$ restAPI.php?type=tags&tag_name= Could anyone point me the problem that I might be having in my Rewrite rules, I am also facing Internal server error sometimes which I am second guessing is due to the linked problem. Note:- I have Apache version 2.2.23 on my shared hosting.

    Read the article

  • View HTML Tags and Webpage Combined in Firefox

    - by Asian Angel
    Do you want an easier way to see a webpage’s html tags without viewing the source code in a separate window? Now you can view the webpage and tags combined in the same window using the X-Ray extension for Firefox. Before Usually if you want to see the source code behind a webpage you have to view it in a separate window. If you are only interested in a specific section then you have to search through the entire set of code just to find what you are looking for. After The X-Ray extension will let you see the document’s tags (including class and ID names) “side by side” with the webpage in the same tab. You can use either the context menu or the tools menu to access the X-Ray command. Here is the same webpage section shown in the first screenshot above. It may look a little odd at first until you get used to seeing both together. Note: You can return the webpage to its’ normal view by either clicking on the X-Ray command again or refreshing the page. The code for part of the sidebar on the same webpage… Followed by one of the sets of links at the end. Looking at another example suppose you are interested in how part of the main feed is set up. Being able to see how a particular element is set up directly in the webpage is certainly better than searching through the entire page of code. Conclusion If you design webpages and want an easy way to see how someone else’s website is coded then you may want to give this extension a try. Links Download the X-Ray extension (Mozilla Add-ons) Similar Articles Productive Geek Tips View Webpage Source Code in Tabs in FirefoxCreate Pre-Formatted Links in FirefoxRemove Webpage Formatting or View the HTML Code When Copying in FirefoxInsert Special Characters & Coding in Online Forms in FirefoxCombine the Address Bar and Progress Bar Together in Firefox TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips HippoRemote Pro 2.2 Xobni Plus for Outlook All My Movies 5.9 CloudBerry Online Backup 1.5 for Windows Home Server Convert BMP, TIFF, PCX to Vector files with RasterVect Free Identify Fonts using WhatFontis.com Windows 7’s WordPad is Actually Good Greate Image Viewing and Management with Zoner Photo Studio Free Windows Media Player Plus! – Cool WMP Enhancer Get Your Team’s World Cup Schedule In Google Calendar

    Read the article

  • Not able to add html tags through jquery in django [closed]

    - by user1665581
    I am trying to add html tags dynamically through jquery in django. $("#div1").append("<h3> Hey !! </h3>"); $("#div1").append("<br/>"); But they are not working. However normal text is getting appended properly like $("#div1").append("Hey i am here"); I even noticed that some of the tags wern't working outside script like <br> so i had to replace it with <br/> also had to apply closing tag for input and also &nbsp is not working. what is wrong???

    Read the article

  • Strage character encoding problem with Eclipse / Spring / Tomcat 6

    - by Czar
    Hi, I have been trying things all da but can't get a proper solution. My problem is: I am developing a Spring MVC based app in my local Tomcat. My MYSQl database has UTF-8 encoding set, all content in there displays properly when using phpMyAdmin. Also the output in LOG files using log4j in catalina.out works fine. My JSP pages are configured by <!-- encoding --> <%@ page contentType="text/html; charset=UTF-8" %> <%@ page pageEncoding="UTF-8" %> Also showing data on my JSP works fine. I can also send data from my Controller without any DB intereference using special chars, e.g. String str = "UTF-8 Test: Ä Ö Ü ß è é â"; logger.debug(str); mav.addObject("utftest", str); That displays correctly in log and on jsp page in browser. BUT: When having special chars directly in my JSP file, e.g. for text in headers, this does not work. FF and Google Chrome display strange chars but report the page to be UTF-8. When switching to Latin, the chars just get more and more strange. Same problem when showing text tokens from my messages.properties file, although Eclipse says when right-clicking that UTF-8 will be used. I am a little it lost and don't know where to check now. Summary: DB storage is fine DB output on JSP is fine Output on JSP directly form controller is fine even reading in form forms is fine .properties files and JSP text is not fine !!! Any ideas? I really appreciate and tips.

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >