Search Results

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

Page 15/299 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Regex in MySql - replace between Tags including Tags

    - by user998163
    I have a text like: [lang_de]Content in German[/lang_de][lang_en]Content in English[/lang_en]. I want to replace all text between [lang_en] and [/lang_en] including the opening and closing language tag. This is my current regex: UPDATE wp_posts SET post_content = '" . addslashes(preg_replace("/[lang_en](.*)[\/lang_en]/", '', $row['post_content'])) . "' WHERE ID = " . $row['ID'] With this regex, I do not get a valid results. It also replaces in html tags and so on. What would be the correct regex?

    Read the article

  • How do I make a third party .jar available to my .jsp page?

    - by Matthew
    I'm just starting to learn JSP (and I'm pretty new to Java in general), and I'd like to use JSON-lib with it. I want to make a page something like this: <%@ page import="net.sf.json.JSONObject"%> <% String json = new JSONObject().put("hello", "world").toString(); out.println(json); %> I downloaded json-lib-2.3-jdk15.jar and put it in the same directory as the .jsp page. But I get this error org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 6 in the generated java file Only a type can be imported. net.sf.json.JSONObject resolves to a package An error occurred at line: 3 in the jsp file: /getCard.jsp JSONObject cannot be resolved to a type 1: <%@ page import="net.sf.json.JSONObject" %> 2: <% 3: String json = new JSONObject().put("hello", "world").toString(); 4: out.println(json); 5: %> 6: How do I make the JSONObject class available to my .jsp page?

    Read the article

  • Meta Tags in Google Site Search

    - by ullmark
    Hi, I'm planning on implementing a google site search (and paying for it so I can get access to the XML). One thing I am wondering about is the possibility to use custom meta tags in it. I've heard yes from colleagues but nothing confirmed. Searching for an answer has given nothing (maybe because you cant?) Anybody knows? Edit: I want to be able to retrieve those meta tags from the search result to be able to provide different styling for different types of pages.

    Read the article

  • How to create a bash function with variable parameters/arguments to grep several keywords/tags

    - by CornSmith
    I'm using the :!grep "tag1" filename | grep "tag2" filename | grep -n "tag3 or more" filename command in vim to search for my code snippets based on their tags (a simple comment at the top of a snippet) in one big file. I use snippets to remember tricky things. This is painful to write out each time. I'd like to make an alias, or function to do something like this: :!greptag tag1 tag2 ... tag39 And it should search the current doc and return the lines with all the tags on them. Vim is set to interactive shell mode so that it can parse my bashrc for aliases/functions. set shellcmdflag=-ic How can I construct a function that allows for variable arguments like this in bash?

    Read the article

  • Relationship DAO, Servlet, JSP and POJO [closed]

    - by John Hendrik
    Possible Duplicate: Relationship DAO, Servlet, JSP and POJO I want to implement a JSP, POJO, DAO and Servlet in my J2EE program. However, I don't fully understand how the relationship between these elements should be. Is the following (MVC) setup the right way to do it? Main class creates servlet(controller) Servlet has a DAO defined in its class DAO has a POJO defined in its class Servlet communicates with the view (JSP page) Please give your feedback.

    Read the article

  • How to hadle a tags inside another tags in NSXMLParser

    - by SimpleMan
    I have a file: <xml> <component>something <system>somethingDeeper <value>somethingDeepest</value> </system> </component> <component>somethinfDifferent <value>somethingDifferentDeeper</value> </component> <value>somethingNew</value> </xml> So i want to distinguish what is inside another tag (ex. <system>) what is not. How to do this with NSXMLParser ? I currently use BOOL ivar's but this is a lot of tags and this is not as elegant as i want it to be. I know that NSXMLParser is a SAX parser and i understand that. In above example I will be enter to didEndElement method three times with: elementName equal value Is there a more elegant way to distinguish what entry was from <component> tag above what not?

    Read the article

  • replace html tags within xml content with wordML formatting tags

    - by Josh
    I am taking an XML document and creating a word document using XSLT and OpenXML. The problem is that when I create the word document, all of the HTML that is within the CDATA tags are not escaped and look like this: GET /recipe/recipe/cat.php/&gt;&quot;&gt;&lt;script&gt;alert(document.domain)&lt;/script&gt; I have tried defining "cdata-section-elements" in my xsl:output; however I receive an error stating that p tag doesn't match the w:t tag.(the p tag is apart of the CDATA HTML). Here is what one of my xsl templates looks like: <xsl:template match="SECTION"> <w:p w:rsidR="00272D24" w:rsidRPr="00272D24" w:rsidRDefault="00272D24"> <w:pPr> <w:rPr> <w:rFonts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/> </w:rPr> </w:pPr> </xsl:template> <w:r w:rsidRPr="00272D24"> <w:rPr> <w:rFonts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial"/> </w:rPr> <w:t> <xsl:value-of select="INFORMATION"/> </w:t> </w:r> </w:p> Here is what the xml looks like: <INFORMATION> <![CDATA[ <P> line 1 of information <P> line 2 of information.......]]> </INFORMATION> Here is what the word output looks like: (white space and poor formatting) DIAGNOSIS: <P> line 1 of information. <P> line 2 of information I need to be able to somehow render the HTML or strip out the HTML. If I strip out the HTML then I would have to search for every possible HTML element, which is madness! Any help at all would be appreciated... Thanks.

    Read the article

  • What happened to HTML table tags?

    - by John
    I started to code HTML in 1998, and in that time I was used to code a lot table tags, playing with tr and td, I learned many things analysing the source code of many portals on the internet with notepad and Microsoft FrontPage, the latter, aw, how many tables overlapping others, it was fun, I loved that time. However, I abandoned web programming for almost seven years and this year I decided to see what's the web programming today likes. Completely different, there are not table tags anymore, it's full of div and span tags. Why happened ? What are these new tags and why nobody codes in table tags anymore ?

    Read the article

  • how to prevent jsp tags from being reused after being classloaded

    - by mkoryak
    I have a problem where certain attributes in tag files stick around for the next time the tag is used. I think this is because the Tag class is being classloaded, and then that same instance is reused for every invocation. So attributes that i do not set in later invocations are not null like i would expect them to be, and contain stale values! I want this to not happen any more. Does anyone know what setting controls that in tomcat 6?

    Read the article

  • How i can access javascript variable value in JSP

    - by Pramod
    function modification() { alert(document.getElementById("record").value); var rec=document.getElementById("record").value; <% Connection connect = DriverManager.getConnection("jdbc:odbc:DSN","scott","tiger"); Statement stm=connect.createStatement(); String record=""; // I want value of "rec" here. ResultSet rstmt=stm.executeQuery("select * from "+record); % }

    Read the article

  • problem with iterate over java.util.Map using "JSF" OR JSTL TAGS

    - by New-To-Java
    I'm using Richfaces jsf and I want to iterate over an Map<Object,Object>. I see many examples on sun forums and other sites but in my case it doesn't work ! here is my xhtml code : <c:forEach items="#{order.customOptions}" var="option"> <h:outputText value="this text does not print"/> <h:outputText value="#{option.value.name}" /> <h:outputText value="#{option.value.key}" /> </c:forEach> and the "order" object is of type "Order". "customOptios" is of type Map<CustomOption,CustomOptionValue> and when I create an javascript alert on to print '#{order.customeOptions}' it's content is true. but it's not even enter in c:forEach loop. please heeeeelp me :(

    Read the article

  • Tags usage in Struts 2

    - by Panther24
    Hi, I have the following code snippet <s:iterator status="stat" value="masterAccountList"> <tr> <td><s:property value="name"/></td> <td><s:property value="status"/></td> <s:set name="DrStat" id="DrStat" value="<s:property value='status'/>"/> <td><s:if test='DrStat.contains("Out")'> Dr. Is Available </s:if> <s:else> Dr. Is not Available </s:else> </td> </tr> </s:iterator> I need to check the status if it contains a keyword and display text accordingly. When I try this, I always get 'Not Available' status. I'm not even sure what the set returns, how can I see that?

    Read the article

  • Save a form in an XML file using Ajax and JSP

    - by novellino
    Hello, I want to create a simple form with a name and an email and save these data in an XML file. So far I found that using Ajax with jQuery is quite easy. So I used the usual code: //dataString have the values taken from the form var dataString = 'name='+ name + '&email=' + email; $.ajax({ type: "POST", url: "users.xml", data: dataString, dataType: "xml", success: function() { .... } }); If I understood well, in the url I should add the name of the XML file that will be created. When the user clicks a button I call the function with the Ajax request, and then I should call somewhere a function for generating the xml. I am using also two beans. One is for setting the elements of the user and the other is for saving the data in the XML. I am using the XStream library for the xml although I don't know if is the best solution. The problem now it that I can not connect all these together in order to save the data in the XML. Does anyone know what should I do? Thanks a lot!

    Read the article

  • jsp get ip address

    - by Alan
    Hello, whats the best way of preventing someone from voting twice? How do i get the users ip address? What if they are on a large network? will everyone on that network show the same ip? thanks UPDATE: request.getRemoteAddr() and request.getRemoteHost() return the Server names, not the client's host name and ip. Anyone else got any bright ideas? Ok, so lets forget about the voting twice thing. Im just trying to get the users ip address? i tried request.getRemoteAddr() and request.getRemoteHost() and think im getting the servers address. I have access to two separate networks and am getting the same IP address :(

    Read the article

  • How to get the file name for <input type="file" in jsp

    - by deepthinker121
    I want to read the file path from html input type="file" (the entry selected in the file dialog by the user) <script> function OpenFileDialog(form) { var a = document.getElementById("inputfile").click(); SampleForm.filePath.value = //set the path here document.SampleForm.submit(); } </script> <form name="SampleForm" action="TestServlet" method="get"> <input type="file" style="display:none;" id="inputfile"/> <a href="javascript:OpenFileDialog(this.form);">Open here</a> <input type="hidden" name="filePath" value=""/> </form> I want the path of the selected file to be read in my Servlet class How do I get the file path? Can I read it from var a? Or is there any way to directly access the file path from the input type="file" from my servlet?

    Read the article

  • jsp chatting with ajax

    - by paramesh
    Hi sirs, I am writing one web chat program using AJAX (a little bit). It is working when both users open a chat page, but I want to open a window when one user send data to others.

    Read the article

  • jsp servlet exception: bean not found within scope.

    - by stu
    I'm getting this error: javax.servlet.ServletException: bean givingFormBean not found within scope on a page with this at the top. The class exists in the classpath, it worked this morning, and I don't get what not found within scope means. I've googled and googled and nothing useful came up.

    Read the article

  • How to pass data from selected rows using checkboxes from JSP to the server

    - by eddy
    Hi, I'd like to know if there's any way to send data to the server for the selected rows using the checkboxes I've put on those rows? I mean , how can I send only the data (in this case mileage ) of those selected rows (selected with the checkboxes) to the server ? see the image Here's the html code I use: <table> <thead> <tr class="tableheader"> <td width="10%"></td> <td width="30%">Vehicle</td> <td width="40%">Driver</td> <td width="10%">Mileage</td> </tr> </thead> <tbody> <c:forEach items="${list}" var="item"> <tr> <td align="center"> <input type="checkbox" name="selectedItems" value="c:out value="${item.numberPlate}"/>"/> </td> <td align="left"><c:out value="${item.numberPlate}"/></td> <td align="left"><c:out value="${item.driver.fullName}" /></td> <td align="left"><input type="text" name="mileage" value="" /></td> </tr> </c:forEach> </tbody> </table> I really hope you can give some guidance on this. Thanks in beforehand.

    Read the article

  • Jsp declaration element

    - by Stardust
    <%! class father { static int s = 0; } %> <% father f1 = new father(); father f2 = new father(); f1.s++; out.println(f2.s); // It must print "1" %> When I run the file, I got this error. Can anybody explain? "The field s cannot be declared static; static fields can only be declared in static or top level types"

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >