Search Results

Search found 3678 results on 148 pages for 'jsf jsp el'.

Page 11/148 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • php code to jsp code.

    - by Reigel
    I'm a PHP coder but need to code some JSP... I need help... What is the equivalent of this PHP code? foreach($_POST as $key => $value){ $$key = $value; } to jsp code... Thanks!

    Read the article

  • Loading Java applet from WEB-INF/classes by JSP

    - by Bruce
    Hi guys, Ive got a problem with loading an applet from WEB-INF/classes directory. The main class of an applet (MainApplet.class) is there in the package aaa, but when loading I got the exception java.lang.ClassNotFoundException. Where am I wrong? My jsp is in Web Pages dir. < jsp:plugin type="applet" code="aaa/MainApplet.class" jreversion="1.6" width="700" height="500" Thanks in advance for the reply!

    Read the article

  • JSP page is not getting reflected in Jetty

    - by [email protected]
    I am using Jetty web server, and while loading JSP page, its getting loaded from cache and not from the server. my updated jsp page is not getting reflected. I was deleted my file and checked out from CVS also. There is no use, the same result came again. What will be the reason ? Thanks in advance.

    Read the article

  • question for jsp coding

    - by sheetal
    I am reteriving the set of values inside a table from database in a jsp page then it is in the form of link. Now I want to click that value and move to another jsp page. How to code the program so that it can recognise that value and it can move to the next desired page. But I unable to do that. please help me....

    Read the article

  • Use CSS referenced images in JSP pages

    - by Alex
    I am writing a java servlet (struts/JSP etc). I am trying to style a progress bar using CSS in a JSP page but get this error when using chrome's developer tools: Resource interpreted as image but transferred with MIME type text/plain. <%@ include file="../include/css/default.css" % And in the CSS file: background:url(../images/bg_bar.gif) no-repeat 0 0; Could anyone explain why this is and show how I can use this CSS in my page?

    Read the article

  • Call JSP file with Javascript

    - by hmak
    I have an HTML file and I want to use javascript to call a JSP file. It doesn't have to be javascript, I'm just looking for the easiest way to call the JSP file from the HTML file. How can I do this? Thanks.

    Read the article

  • What do the external JSF libraries/frameworks add?

    - by kgrad
    I have seen mention of a bunch of external JSF Libraries such as ICEfaces, Richfaces, etc. However, I am unsure as to what these libraries actually add over just using JSF 2.0. Are they just additional components that are pre-built? I know that PrettyFaces adds URL rewriting, and I Believe that ICEFaces/Richfaces add Ajax enabled components? What are some other major component libraries, what are their benefits / why should people use them? Additionally, what does a framework like SEAM add over using straight JSF2 with EJB? Is MYFaces simply a different implementation of JSF?

    Read the article

  • using generic and for each loop in jsp

    - by mawia
    I am developing a web application. I am using Eclipse as IDE. I was using generic and for each loop, both being feature of java 1.5, and it compiled quite fine when used in backend means in simple java classes. But when I'm using these on jsp, jsp is failing to compile with error showing generic and for each as culprit. Can you shed some light on this? Maybe I am at fault with Eclipse settings?

    Read the article

  • Bean validation VS JSF validation

    - by henloke
    When facing the problem of validating a property in a JSF2 application there are two main approaches. Defining the validation on the ManagedBean using an Annotation @ManagedBean public class MyBean { @Size(max=8) private String s; // Getters setters and other stuff. } or declaring it on the jsf page: <h:inputText value="#{myBean.s}"> <f:validateLength maximum="8"/> </h:inputText> It happens that I can't decide for none of them. The first one is nice because it removes some code from the jsf pages (which is always good since those pages are not eye friendly by definition) but makes harder to see 'at a glance' what's going on with the page when checking the jsf file. Which one do you think is clearer? Nicer? Better?

    Read the article

  • Top 10 Vulnerabilidades de Seguridad en el WEB.CONFIG- PARTE 1

    - by Jason Ulloa
    Durante estos post, mostraré los 10 problemas o errores de configuración en el web.config que provocan grandes vulnerabilidades en las aplicaciones. Estos errores, en su mayoría vienen dados por desconocimiento a fondo del manejo de las secciones de configuración de nuestras aplicaciones. En esta primera parte, veremos los primeros 5 de ellos. 1. El modo Custom Errors Este es el primero de nuestra lista, ya que, será uno de los que casi siempre habilitemos cuando estamos desarrollando una aplicación web y que es de mucho cuidado. Una etiqueta común y vulnerable de esta configuración sería <configuration> <system.web> <customErrors mode="Off">   Una forma de corregir la vulnerabilidad que se expone a continuación sería cambiando la etiqueta por <configuration> <system.web> <customErrors mode="RemoteOnly">

    Read the article

  • Embedding a querystring parameter in a hidden input with JSP results ing 500 error.

    - by dacracot
    I need a hidden input to contain the value passed by the querystring via a JSP's URL. The URL looks like... http://nowhere.com/myapp/blah.jsp?key=12345 The JSP looks like... <html> <body> <input id="key" type="hidden" value="<%=request.getParameter('key')%>" /> </body> </html> This causes a 500 error... SEVERE: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 3 in the jsp file: /myapp/blah.jsp Invalid character constant 1: <html> 2: <body> 3: <input id="key" type="hidden" value="<%=request.getParameter('key')%>" /> 4: </body> 5: </html>

    Read the article

  • Using DisplayTag library, I want to have the currently selected row have a unique custom class using

    - by Mary
    I have been trying to figure out how to highlight the selected row in a table. In my jsp I have jsp scriplet that can get access to the id of the row the displaytag library is creating. I want to compare it to the the id of the current row selected by the user ${currentNoteId}. Right now if the row id = 849 (hardcoded) the class "currentClass" is added to just that row of the table. I need to change the 849 for the {$currentNoteId} and I don't know how to do it. I am using java, Spring MVC. The jsp: ... <% request.setAttribute("dyndecorator", new org.displaytag.decorator.TableDecorator() { public String addRowClass() { edu.ilstu.ais.advisorApps.business.Note row = (edu.ilstu.ais.advisorApps.business.Note)getCurrentRowObject(); String rowId = row.getId(); if ( rowId.equals("849") ) { return "currentClass"; } return null; } }); %> <c:set var="currentNoteId" value="${studentNotes.currentNote.id}"/> ... <display:table id="noteTable" name="${ studentNotes.studentList }" pagesize="20" requestURI="notesView.form.html" decorator="dyndecorator"> <display:column title="Select" class="yui-button-match" href="/notesView.form.html" paramId="note.id" paramProperty="id"> <input type="button" class="yui-button-match2" name="select" value="Select"/> </display:column> <display:column property="userName" title="Created By" sortable="true"/> <display:column property="createDate" title="Created On" sortable="true" format="{0,date,MM/dd/yy hh:mm:ss a}"/> <display:column property="detail" title="Detail" sortable="true"/> </display:table> ... This could also get done using javascript and that might be best, but the documentation suggested this so I thought I would try it. I cannot find an example anywhere using the addRowClass() unless the comparison is to a field already in the row (a dollar amount is used in the documentation example) or hardcoded in like the "849" id. Thanks for any help you can provide.

    Read the article

  • Jmesa table page navigation

    - by Sara
    I am new to Jmesa and am trying to use it on my jsp page. I use exactly same JSP and controller code as the example on http://code.google.com/p/jmesa/wiki/JSPTagExample . The table shows up and looks fine. The problem is non of the buttons on the toolbar are working. E.g. page navigation arrows, etc. What might be wrong with my code( As I said it is exactly same as the example). Should I add extra code for page navigation? Thanks, Sara. Update: I found out what the problem is, after I enter toolbar buttons it routes to "localhost:8080/portal/projectTag.run?maxRows=4&projectTag_tr_=true&projectTag_p_=1&projectTag_mr_=4" "Instead of "localhost:8080/portal/page/projects/projectTag.run?maxRows=4&projectTag_tr_=true&projectTag_p_=1&projectTag_mr_=4" So it doesn't include the "/page/projects" in the url. How can I add that?

    Read the article

  • JSP compilation error upon changing XML parser to Xerces

    - by elduff
    All, I'm working on a java webapp that we deploy in the Resin web app server. I have been doing some XML parsing for a new part of the application, and realized that our app was using Resin classes to do the parsing. I wanted to get away from that and use something more standard for a number of reasons, so I set these system properties in my resin config file (and added the xerces jar to my classpath): <system-property javax.xml.parsers.DocumentBuilderFactory="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/> <system-property javax.xml.parsers.SAXParserFactory="org.apache.xerces.jaxp.SAXParserFactoryImpl"/> And, now I'm getting JSP compilation errors on several pages (I guess Resin's built in parser was more lenient). The error reads: org.xml.sax.SAXParseException: The value of attribute "title" associated with an element type "display:column" must not contain the '<' character. And, the 'display:column' tag on some pages does indeed contain markup in the 'title' attribute. Here's an example: <display:column scope='col' class=" appealColorBG selectAllWidth" title="<span class='centerThis'><label for='selectAll'>Select All</label><br /> <input type='checkbox' name='selectAll' id='selectAll' onClick='selectAllCheckboxes();'/></span> " > That's some ugly JSP code, I know, but it's also code that's already in production, so I'm hesitant to change it. Does anyone know of a way that I can set xerces so that it will allow the JSP to compile as is?

    Read the article

  • Output reformatted text within a file included in a JSP

    - by javanix
    I have a few HTML files that I'd like to include via tags in my webapp. Within some of the files, I have pseudo-dynamic code - specially formatted bits of text that, at runtime, I'd like to be resolved to their respective bits of data in a MySQL table. For instance, the HTML file might include a line that says: Welcome, [username]. I want this resolved to (via a logged-in user's data): Welcome, [email protected]. This would be simple to do in a JSP file, but requirements dictate that the files will be created by people who know basic HTML, but not JSP. Simple text-tags like this should be easy enough for me to explain to them, however. I have the code set up to do resolutions like that for strings, but can anyone think of a way to do it across files? I don't actually need to modify the file on disk - just load the content, modify it, and output it w/in the containing JSP file. I've been playing around with trying to load the files into strings via the apache readFileToString, but I can't figure out how to load files from a specific folder within the webapp's content directory without hardcoding it in and having to worry about it breaking if I deploy to a different system in the future.

    Read the article

  • Trouble passing JSP values to ActionForm (Struts)

    - by tacotime
    Hi, I am a newbie to Struts and have inherited a problem. I am trying to pass 3 values contained in the same table cell from a JSP to my ActionForm class. The first value (and others in the JSP) work fine, but for some reason the other two do not. I have the appropriate getters and setters, but only the first (newrecnum) shows up, the other two are null. Is there a limitation to only pass the first value? Or is there something else wrong? Here is the JSP code: <td> <html:text size="10" maxlength="10" property="newrecnum"/><br> <html:text size="5" maxlength="5" property="newrectime"/> <html:select property="newreccode" disabled="true"> <html:option value="YES">YES</html:option> <html:option value="NO">NO</html:option></html:select> </td> I can include the ActionForm code as well if needed. Thanks!

    Read the article

  • Why can't I wrap the ServletRequest when trying to capture JSP Output

    - by Patrick Cornelissen
    I am trying to dispatch in a servlet request handler to the JSP processor and capture the content of it. I am providing wrapper instances for the ServletRequest and ServletResponse, they implement the corresponding HTTPServletRequest/-Response interfaces, so they should be drop-in replacements. All methods are currently passed to the original Servlet Request object (I am planning to modify some of them soon). Additionally I have introduced some new methods. (If you want to see the code: http://code.google.com/p/gloudy/source/browse/trunk/gloudyPortal/src/java/org/gloudy/gloudlet/impl/RenderResponseImpl.java) The HttpServletResponse uses it's own output streams to capture the output. When I try to call request.getRequestDispatcher("/WEB-INF/views/test.jsp").include(request, response); With my request and response wrappers the method returns and no content has been captured. When I tried to pass the original request object it worked! But that's not what I need in the long run... request.getRequestDispatcher("/WEB-INF/views/test.jsp").include(request.getServletRequest(), response); This works. getservletRequest() returns the original Request, given by the servlet container. Does anyone know why this is not working with my wrappers?

    Read the article

  • how to use a list containing the query result with hibernate and display it in jsp

    - by kawtousse
    hi everyone, In my servlet I construct the query like the following: net.sf.hibernate.Session s = null; net.sf.hibernate.Transaction tx; try { s= HibernateUtil.currentSession(); tx=s.beginTransaction(); Query query = s.createQuery("select opcemployees.Nom,opcemployees.Prenom,dailytimesheet.TrackingDate,dailytimesheet.Activity," + "dailytimesheet.ProjectCode,dailytimesheet.WAName,dailytimesheet.TaskCode," + "dailytimesheet.TimeSpent,dailytimesheet.PercentTaskComplete from Opcemployees opcemployees,Dailytimesheet dailytimesheet " + "where opcemployees.Matricule=dailytimesheet.Matricule and dailytimesheet.Etat=3 " + "group by opcemployees.Nom,opcemployees.Prenom" ); List opdts= query.list(); request.setAttribute("items", opdts); request.getRequestDispatcher("EspaceValidation.jsp").forward(request, response); } catch (HibernateException e){ e.printStackTrace();} But in the jsp I can't display the result correctly. I do the following in JSP: <table> <c:forEach items="${items}" var="item"> <tr> <td>${item}</td> </tr> </c:forEach> </table> thanks for help.

    Read the article

  • JSP getParameter problem

    - by user236501
    I have a form, if the timer reach the form will auto redirect to the Servlet to update database. My problem now is if javascript redirect the window to servlet my request.getParameter is null. function verify(f,whichCase){ if(whichCase == "Submit"){ msg = "Are you sure that you want to submit this test?"; var i = confirm(msg) if(i){ parent.window.location = "sindex.jsp" } return i; } } I doing this because i got a iframe in my jsp. Timer update problem have to use iframe. So, when time up or user click submit parent.window.location can let me refresh parent window <form method="POST" action="${pageContext.request.contextPath}/TestServlet" onSubmit="return verify(this,whichPressed)"> My form when user click submit button within the timing, it will trigger the verify function to let user confirm submit. So inside my TestServlet i got this, because using javascript redirect request.getParameter("answer") this keep return me null. protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (request.getParameter("Submit") != null) { String ans = request.getParameter("answer"); Answer a = new Answer(ans, no); aa.CreateAnswer(an,t.getTestCode(),username); RequestDispatcher rd = request.getRequestDispatcher("/sindex.jsp"); rd.forward(request, response); } } Below are my timer when time up redirect to TestServlet trigger the doGet method if((mins == 0) && (secs == 0)) { window.alert("Time is up. Press OK to submit the test."); // change timeout message as required var sUrl = "TestServlet"; parent.window.location = sUrl // redirects to specified page once timer ends and ok button is pressed } else { cd = setTimeout("redo()",1000); }

    Read the article

  • JSP JPA Form: how to insert value in a path variable

    - by kajarigd
    I have the following code snippet in a jsp file: <hr> <form:form commandName="newTicketSale" id="reg" action="transactionResult.htm"> <h3>Buy Movie Tickets:</h3> <form:label path="movieName">Movie Name:</form:label> <form:input path="movieName" /> <form:errors class="invalid" path="movieName" /> <form:label path="ticketPrice">Ticket Price:</form:label> <form:input path="ticketPrice" /> <form:errors class="invalid" path="ticketPrice" /> <input type="submit"> <br><br> </form:form> I am using JPA tags in this jsp. Now, in the commandName "newTicketSale" there is another parameter called userId. In the jsp file itself I need to insert value ${name} in userId, so that in the Controller file when I am doing @Valid @ModelAttribute("newTicketSale") MovieTicket newTicket I can retrieve the value ${name} when I am doing newTicket.getUserId(). I don't know how to do this. Please help! Thanks in advance!

    Read the article

  • How to show alert in a jsp from a servlet and then redirect to another jsp?

    - by Xaul Omar Tobar
    I tried this but does not display the message only redirects login.jsp <form method="post" action="Login_Servlet" > <input name="idUsuario" type="text"/> <input name="password" type="password" /> <button type="submit">Entrar</button> </form> Login_Servlet response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); String userid= request.getParameter("idUser"); String password = request.getParameter("password"); Login_Service login_Service = new Login_Service(); boolean result = login_Servicio.aut(userid, password); Usuario user = login_Servicio.getUsuariosByUsuario(userid); if(result == true){ request.getSession().setAttribute("user", user); response.sendRedirect("vistas/Inicio.jsp"); } else{ out.println("<script type=\"text/javascript\">"); out.println("alert('User or password incorrect');"); out.println("</script>"); response.sendRedirect("index.jsp"); } Is it possible to display a message like this? if so I'm doing wrong?

    Read the article

  • JSF and Jquery - doesn't work

    - by darkrain
    Hi I am trying to get Jquery work in JSF. But i doesn't work. Can somebody help me ? The scripts are in the folder : resources This is my JSP code : I am using netbeans and the <?xml version="1.0" encoding="UTF-8"?> <!-- Document : testpage Created on : 08.07.2009, 01:16:01 Author : reBourne --> <jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf"> <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/> <f:view> <webuijsf:page id="page1"> <webuijsf:html id="html1"> <webuijsf:head id="head1"> <webuijsf:link id="link1" url="/resources/css/stylesheet.css"/> <webuijsf:script id="script1" url="resources/jquery.js"/> <webuijsf:script id="script2" url="recources/main.js" /> <style> body { margin:0; padding:40px; background:#fff; font:80% Arial, Helvetica, sans-serif; color:#555; line-height:180%; } h1{ font-size:180%; font-weight:normal; color:#555; } h2{ clear:both; font-size:160%; font-weight:normal; color:#555; margin:0; padding:.5em 0; } a{ text-decoration:none; color:#f30; } p{ clear:both; margin:0; padding:.5em 0; } pre{ display:block; font:100% "Courier New", Courier, monospace; padding:10px; border:1px solid #bae2f0; background:#e3f4f9; margin:.5em 0; overflow:auto; width:800px; } img{border:none;} ul,li{ margin:0; padding:0; } li{ list-style:none; float:left; display:inline; margin-right:10px; } /* */ #preview{ position:absolute; border:1px solid #ccc; background:#333; padding:5px; display:none; color:#fff; } /* */ </style> </webuijsf:head> <webuijsf:body id="body1" style="-rave-layout: grid"> <webuijsf:form id="form1"> <ul> <li> <a class="preview" href="resources/images/1.jpg"> <img alt="gallery thumbnail" src="resources/images/1s.jpg"/> </a> </li> <li> <a class="preview" href="resources/images/2.jpg"> <img alt="gallery thumbnail" src="resources/images/2s.jpg"/> </a> </li> <li> <a class="preview" href="resources/images/3.jpg"> <img alt="gallery thumbnail" src="resources/images/3s.jpg"/> </a> </li> <li> <a class="preview" href="resources/images/4.jpg"> <img alt="gallery thumbnail" src="resources/images/4s.jpg"/> </a> </li> </ul> </webuijsf:form> </webuijsf:body> </webuijsf:html> </webuijsf:page> </f:view> </jsp:root> Or has someone a real life example with Javascript ?!

    Read the article

  • JSF validateLength question

    - by user337515
    I have a input field with validation to validate the max and min length <h:inputText id="LABEL_ID" styleClass="textboxsmall" value="#{sampleDatatableBean.accessionLabelId}" maxlength="5"> <f:validateLength minimum="4" maximum="5" /> </h:inputText> <br/><h:message id="LABEL_ID_MSG" styleClass="errorMessage" for="LABEL_ID" /> It validates but I get the below message: "Value is less than allowable minimum of {0}" Shouldn't {0} be replaced by value from minimum? Not sure why its not picking up the value. Any ideas? Version info: <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> <tlib-version>1.0</tlib-version> <jsp-version>1.2</jsp-version>

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >