Search Results

Search found 1850 results on 74 pages for 'jsp'.

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

  • What would be the simplest way to deal with a text file using JSP?

    - by Nano Taboada
    First and foremost I should acknowledge that I have no experience at all using Java ServerPages, but I'm positive about achieving this task if you guys help me out a bit since it doesn't seem like something difficult for a seasoned JSP programmer. Anyway the thing is, there's an actual running JSP application within a *NIX box which I somewhat administer with kind of good permissions. The idea is to create a new but dead simple JSP page to control some Korn Shell scripts I've got running there. So the goal is to make some sort of HTML form that will be writing some kind of scriptStatus.on / scriptStatus.off file: #!usr/bin/ksh # coolScript.sh # This is my cool script that is being launched by cron every 10 minutes. if [ -e scriptStatus.off ] then # monitor disabled else # monitor enabled fi which then can be checked for existence within the running script, therefore allowing to easily activate / deactivate it without actually have do deal with cron. Please let me know if all this does make any sense and don't hesitate to ask as much questions as needed. Thanks much in advance!

    Read the article

  • Is it possible to evaluate a JSP only once per session, and cache it after that?

    - by Bears will eat you
    My site has a nav menu that is dynamically built as a separate JSP, and included in most pages via <jsp:include />. The contents and styling of the menu are determined by which pages the user does and doesn't have access to. The set of accessible pages is retrieved from the database when a user logs in, and not during the course of a session. So, there's really no need to re-evaluate the nav menu code every time the user requests a page. Is there an easy way to generate the markup from the JSP only once per session, and cache/reuse it during the session?

    Read the article

  • Servlet/JSP Flow Control: Enums, Exceptions, or Something Else?

    - by Christopher Parker
    I recently inherited an application developed with bare servlets and JSPs (i.e.: no frameworks). I've been tasked with cleaning up the error-handling workflow. Currently, each <form> in the workflow submits to a servlet, and based on the result of the form submission, the servlet does one of two things: If everything is OK, the servlet either forwards or redirects to the next page in the workflow. If there's a problem, such as an invalid username or password, the servlet forwards to a page specific to the problem condition. For example, there are pages such as AccountDisabled.jsp, AccountExpired.jsp, AuthenticationFailed.jsp, SecurityQuestionIncorrect.jsp, etc. I need to redesign this system to centralize how problem conditions are handled. So far, I've considered two possible solutions: Exceptions Create an exception class specific to my needs, such as AuthException. Inherit from this class to be more specific when necessary (e.g.: InvalidUsernameException, InvalidPasswordException, AccountDisabledException, etc.). Whenever there's a problem condition, throw an exception specific to the condition. Catch all exceptions via web.xml and route them to the appropriate page(s) with the <error-page> tag. enums Adopt an error code approach, with an enum keeping track of the error code and description. The descriptions can be read from a resource bundle in the finished product. I'm leaning more toward the enum approach, as an authentication failure isn't really an "exceptional condition" and I don't see any benefit in adding clutter to the server logs. Plus, I'd just be replacing one maintenance headache with another. Instead of separate JSPs to maintain, I'd have separate Exception classes. I'm planning on implementing "error" handling in a servlet that I'm writing specifically for this purpose. I'm also going to eliminate all of the separate error pages, instead setting an error request attribute with the error message to display to the user and forwarding back to the referrer. Each target servlet (Logon, ChangePassword, AnswerProfileQuestions, etc.) would add an error code to the request and redirect to my new servlet in the event of a problem. My new servlet would look something like this: public enum Error { INVALID_PASSWORD(5000, "You have entered an invalid password."), ACCOUNT_DISABLED(5002, "Your account has been disabled."), SESSION_EXPIRED(5003, "Your session has expired. Please log in again."), INVALID_SECURITY_QUESTION(5004, "You have answered a security question incorrectly."); private final int code; private final String description; Error(int code, String description) { this.code = code; this.description = description; } public int getCode() { return code; } public String getDescription() { return description; } }; protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String sendTo = "UnknownError.jsp"; String message = "An unknown error has occurred."; int errorCode = Integer.parseInt((String)request.getAttribute("errorCode"), 10); Error errors[] = Error.values(); Error error = null; for (int i = 0; error == null && i < errors.length; i++) { if (errors[i].getCode() == errorCode) { error = errors[i]; } } if (error != null) { sendTo = request.getHeader("referer"); message = error.getDescription(); } request.setAttribute("error", message); request.getRequestDispatcher(sendTo).forward(request, response); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } Being fairly inexperienced with Java EE (this is my first real exposure to JSPs and servlets), I'm sure there's something I'm missing, or my approach is suboptimal. Am I on the right track, or do I need to rethink my strategy?

    Read the article

  • Relationship DAO, Servlet, JSP and POJO

    - by John Hendrik
    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 read attachment messages without using scriptlets in JSP?

    - by Stardust
    Hi, I want to know how can I read attachment messages without using scriplets in JSP? After getting Message object as an attribute by using request object from servlets, how can I confirm whether Message content is an instance of Multipart or not without using scriplets like: if(message.getContent() instanceOf Multipart) How can I read the content of any file by using EL in JSP? As I can't see any getRead method in inputStream subclass.

    Read the article

  • Should I add try/catch around when casting on an attribute of JSP implicit object?

    - by Michael Mao
    Hi all: Basically what I mean is like this: List<String[]> routes = (List<String[]>)application.getAttribute("routes"); For the above code, it tries to get an attribute named "routes" from the JSP implicit object - application. But as everyone knows, after this line of code, routes may very well contains a null - which means this application hasn't got an attribute named "routes". Is this "casting on null" good programming practice in Java or not? Basically I try to avoid exceptions such as java.io.InvalidCastException I reckon things like this are more as "heritage" of Java 1.4 when generic types were not introduced to this language. So I guess everything stored in application attributes as Objects (Similar to traditional ArrayList). And when you do "downcast", there might be invalid casts. What would you do in this case? Update: Just found that although in the implicit object application I did store a List of String arrays, when I do this : List<double[]> routes = (List<double[]>)application.getAttribute("routes"); It doesn't produce any error... And I felt not comfortable already... And even with this code: out.print(routes.get(0)); It does print out something strange : [Ljava.lang.String;@18b352f Am I printing a "pointer to String"? I can finally get an exception like this: out.print(routes.get(0)[1]); with error : java.lang.ClassCastException: [Ljava.lang.String; Because it was me to add the application attribute, I know which type should it be cast to. I feel this is not "good enough", what if I forget the exact type? I know there are still some cases where this sort of thing would happen, such as in JSP/Servlet when you do casting on session attributes. Is there a better way to do this? Before you say:"OMG, why you don't use Servlets???", I should justify my reason as this: - because my uni sucks, its server can only work with Servlets generated by JSP, and I don't really want to learn how to fix issues like that. look at my previous question on this , and this is uni homework, so I've got no other choice, forget all about war, WEB-INF,etc, but "code everything directly into JSP" - because the professors do that too. :)

    Read the article

  • How can i maintain last cookie value in flex with jsp?

    - by praveen
    Hi All, my login form in flex when I login I have created a cookie in jsp like this name setValueCookie.jsp <%@ page language="java" import="java.util.* , javax.net.*" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <% String username = request.getParameter("value"); System.out.println("Email got in cookieSet = " + username); if(username==null) username=""; Date now = new Date(); String timestamp = now.toString(); Cookie cookie = new Cookie("username",username); cookie.setMaxAge(365 * 24 * 60 * 60); response.addCookie(cookie); %> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>DashBoard-Cookie</title> </head> <body> </body> </html> now using Http service request parameter i am passing username 'Value' to this jsp. and i am reading cookie value from getValueCookie.jsp like this <% String cookieName = "username"; Cookie cookies [] = request.getCookies (); Cookie myCookie = null; String result; if (cookies != null) { for (int i = 0; i < cookies.length; i++) { if (cookies [i].getName().equals (cookieName)) { myCookie = cookies[i]; break; } } } %> <data> <status><%=myCookie.getValue().toString()%></status> </data> through the httpservice value i am getting but if i open a new window or any new tab cookie value is not getting how can i solve this? Thanks in advance.

    Read the article

  • How to give full path name in JSP programming?

    - by sujoy
    Actually when I run a particular JSP page it run perfectly(with external style sheet) but when servlet return back the control through RequestDispatcher, the page is not displaying properly means it don't took the css file path. In my program the stylesheet is present inside css directory and the page is present inside another directory named JSP. The code which include the css in the program is- <link rel="stylesheet" href="../css/stylesheet.css" type="text/css"/>

    Read the article

  • java httpclient post

    - by Eric V
    Hi, I have a question about how to allow my jsp page to issue a post command to the server, and still have the browser fallow the re direction of the posted page. Here are the code snipets: code that does the post (this is inside a jsp file): HttpClient client = new DefaultHttpClient(); client.getParams().setParameter("SUBMITTED", "submitted"); client.getParams().setParameter("xxxxxxxx", purchaser.getemail()); client.getParams().setParameter("xxxxxxxx", purchaser.getsuject()); HttpPost method = new HttpPost(url+"process.jsp"); client.execute(method); here is a snipet of process.jsp if (person.getStatus() == person.ACTIVE) response.sendRedirect("Account.jsp); else if (person.getStatus() == person.ERROR) response.sendRedirect("Error.jsp); I would like the browser to the fallow/goto the redirect from the process.jsp. Does anyone know a tutorial that would help me or Am I going about this the wrong way. Thanks, eric

    Read the article

  • Using a Filter to serve a specific page?

    - by user246114
    Hi, I am using a class which implements Filter for my jsp stuff. It looks like this: public class MyFilter implements Filter { public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { request.getRequestDispatcher("mypage.jsp").forward(request, response); } } So the target, "mypage.jsp", is just sitting in my top-level directory. The filter works fine if I'm entering urls like: http://www.mysite.com/foo http://www.mysite.com/boo but if I enter a trailing slash, I'll get a 404: http://www.mysite.com/foo/ http://www.mysite.com/boo/ HTTP ERROR: 404 /foo/mypage.jsp RequestURI=/foo/mypage.jsp it seems if I enter the trailing slash, then the filter thinks I want it to look for mypage.jsp in subfolder foo or boo, but I really always want it to just find it at: http://www.mysite.com/mypage.jsp how can I do that? Thank you

    Read the article

  • Issues with timed out downloads via TomCat?

    - by Ira Baxter
    We get, in our opinion, a lot of failed download attempts and want to understand why. We offer downloads via an email link (typical): http://www.semanticdesigns.com/deliverEval/<productname> This is processed by Tomcat on Linux via a jsp file, with the following code: response.addHeader( "Content-Disposition", "attachment; filename=" + fileTail ); response.addHeader( "Content-Type", "application/x-msdos-program" ); byte[] buf = new byte[8192]; int read; try { java.io.FileInputStream input = new java.io.FileInputStream( filename ); java.io.OutputStream o = response.getOutputStream(); while( ( read = input.read( buf, 0, 8192 ) ) != -1 ){ o.write( buf, 0, read ); } o.flush(); } catch( Exception e ){ util.fatalError( request.getRequestURI(), "Error sending file '" + filename + "' to client", e ); throw e; } We get a lot of reported errors (about 50% error rate): URI --- /deliverEval/download.jsp Code Message: Error sending file '/home/sd/ShippingMasters/DMS/Domains/C/GCC3/Tools/TestCoverage/SD_C~GCC3_TestCoverage.1.6.12.exe' to client Stack Trace ----------- null at org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(byte[], int, int) (Unknown Source) at org.apache.tomcat.util.buf.ByteChunk.append(byte[], int, int) (Unknown Source) at org.apache.coyote.tomcat5.OutputBuffer.writeBytes(byte[], int, int) (Unknown Source) at org.apache.coyote.tomcat5.OutputBuffer.write(byte[], int, int) (Unknown Source) at org.apache.coyote.tomcat5.CoyoteOutputStream.write(byte[], int, int) (Unknown Source) at org.apache.jsp.deliverEval.download_jsp._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) (Unknown Source) at org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) (Unknown Source) at javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) (Unknown Source) at org.apache.jasper.servlet.JspServletWrapper.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) (Unknown Source) at org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) (Unknown Source) at org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) (Unknown Source) at javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) (Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) (Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) (Unknown Source) at org.apache.catalina.core.StandardWrapperValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext) (Unknown Source) We don't understand why this rate should be so high. Is there any way to get more information about the cause of the error? It is useful to know that these are pretty big documents, 3-50 megabytes. They reside on the Linux server so reading them is just a local disk read, and is unlikely to be a contributor to the problem. But sheer size might be an issue for the recipients browser? Is this kind of error rate typical for downloads? My personal experience downloading other's documents suggests no; our internal attempts show this to be very reliable, but we're operating on our internal network for such experiments so we're missing the complexity of the intervening internet.

    Read the article

  • Building a website, want to use java

    - by Robb
    I'd like to make a simple-ish website that is essentially a small game. Key strokes are to be processed and sent to a server (already acquired and should support SQL and JSP, I believe) which then translate to a location and written to the DB. SQL queries are to be used to retrieve these locations and written to other clients connected to the website. Their page is to be updated with these locations. I have working knowledge of Java, jQuery/Ajax, SQL and JavaScript but I'm unfamiliar with JSP and how everything hooks up. I'm aware of the MVC paradigm as well. For my little game idea, would these technologies work? Am I over thinking this and can make it much easier to implement? What might be a good tutorial or example to study?

    Read the article

  • Java EE 6: JSF vs Servlet + JSP. Should I bother learning JSF?

    - by Harry Pham
    I am trying to get familiar with Java EE 6 by reading http://java.sun.com/javaee/6/docs/tutorial/doc/gexaf.html. I am a bit confused about the use of JSF. Usually, the way I develop my Web App would be, Servlet would act like a controller and JSP would act like a View in an MVC model. So Does JSF try to replace this structure? Below are the quote from the above tutorial: Servlet are best suited for service-oriented App and control function of presentation-oriented App like dispatching request JSF and Facelet are more appropriated for generating mark-up like XHTML, and generally used for presentation-oriented App Not sure if I understand the above quote too well, they did not explain too well what is service-oriented vs presentation-oriented. A JavaServer Faces application can map HTTP requests to component-specific event handling and manage components as stateful objects on the server. Any knowledgeable Java developer out there can give me a quick overview about JSF, JSP and Servlet? Do I integrate them all, or do I use them separated base on the App? if so then what kind of app use JSF in contrast with Servlet and JSP A JavaServer Faces application can map HTTP requests to component-specific event handling and manage components as stateful objects on the server. Sound like what servlet can do, but not sure about manage components as stateful objects on the server. Not even sure what that mean? Thanks in advance.

    Read the article

  • JSP:Include not rendering the page correctly

    - by sreekanth
    am having trouble with including a jsp page with tag. This is what is happening. I making changes to a portlet application running on Websphere 7 server. This is the hierarchy of the jsp pages. blankPage.jsp --bookingViewTabs.jsp -- availableRooms.jsp meaning blankPage is included in bookingViewTabs which is inturn included in availableRooms.jsp I have 2 problems with this. (1). The blankPage.jsp does not render correctly on the screen. It gets cutoff (2). The other is in blankPage.jsp there is a form called "guestProfileSearchResultsFormId". this form has several hidden fields for data. example, "guestId" which is a child of that form and can be accessed formname.fieldname, but when i include that page into another jsp as the first include(there are several includes on the page) under the another form tag, the form field is not being rendered as a child of the form, but as a sibling of the form. If i change the order and include some other page and include this, it is working as it is supposed to have. meaning with children intact. I don't understand this behavior. I HAVE ATTACHED A GIF IMAGE OF WHAT I SEE ON THE BROWSER Any help is greatly appreciated. Thanks in advance

    Read the article

  • How to convert int to char in JSP expression language?

    - by james.bunt
    I need to display incremented single characters to denote footnotes in a table of data in a JSP. In Java I would normally have a char variable and just increment it, or convert an int to a char by casting it (e.g. (char)(i + 97) to convert a 0-based index to a-z). I can't figure out how to do this in expression language short of writing my own JSTL function. Does anyone know how to convert an int to char in EL? Or how to increment a char variable in EL? Or possibly even a better technique to do what I'm trying to do in JSP/EL? Example of what I need to be able to produce: a mydata b myotherdata ... a first footnote b second footnote

    Read the article

  • How do I make a Java ResultSet available in my jsp?

    - by melling
    I'd like to swap out an sql:query for some Java code that builds a complex query with several parameters. The current sql is a simple select. <sql:query var="result" dataSource="${dSource}" sql="select * from TABLE " </sql:query How do I take my Java ResultSet (ie. rs = stmt.executeQuery(sql);) and make the results available in my JSP so I can do this textbook JSP? To be more clear, I want to remove the above query and replace it with Java. <% ResultSet rs = stmt.executeQuery(sql); // Messy code will be in some Controller % <c:forEach var="row" items="${result.rows}" <c:out value="${row.name}"/ </c:forEach Do I set the session/page variable in the Java section or is there some EL trick that I can use to access the variable?

    Read the article

  • Browser game in JSP? [closed]

    - by Constant
    I want to develop a browser-game (like ogame, travian) and I have some doubts in which technologies should I use. I was thinking in a server-side in JSP,Java and a client-side in HTML (or HTML5 if I learn to give it good use). Do you think my choices are right? I would like to make a board where many players could move simultaneously between tiles or squares. Do you think is possible in JSP or I should start with other language? Any suggestion aprecciated, and apologies for my english. Thank you! Regards!

    Read the article

  • Ant task to pre-compile JSPs on weblogic server

    - by user24560
    I am trying to create an ant task to compile JSPs. Here are the excerpts from the build.xml related to the task: .... <fileset dir="${java.home}/lib"> <include name="tools.jar"/> </fileset> <java classname="weblogic.jspc" fork="yes"> <classpath refid="weblogic.jsp.classpath" /> <sysproperty key="weblogic.jsp.windows.caseSensitive" value="false"/> <arg line="-forceGeneration -keepgenerated -compileAll -webapp ${jsp.src.dir} -d ${jsp.generated.src.dir}"/> </java> When I try to run wl.jsp.generate task, I get: wl.jsp.generate: [java] [jspc] warning: expected file /WEB-INF/web.xml not found, tag libraries cannot be resolved. [java] [jspc] Overriding default descriptor option 'keepgenerated' with value specified on command-line 'true' [java] Exception encountered while compiling C:\workspace\smcmw\smcmw_browser\jsp\smcesearchprogress.jsp [java] java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo.(Ljava/lang/String;ZLjava/lang/String;ZZLjava/lang/String;ZZLjava/lang/String;Ljava/lang/String;)V [java] at weblogic.jsp.internal.jsp.tag.TagAttrInfoEx.<init>(TagAttrInfoEx.java:64) [java] at weblogic.jsp.internal.jsp.tag.TagAttrInfoEx.<init>(TagAttrInfoEx.java:57) [java] at weblogic.jsp.internal.jsp.tag.TagAttrInfoEx.<init>(TagAttrInfoEx.java:41) [java] at weblogic.jsp.internal.jsp.tag.TagAttrInfoEx.read(TagAttrInfoEx.java:86) Looks like it fails because it can't find WEB-INF/web.xml file and tag libraries. How can I fix this?

    Read the article

  • How can I go through a Set in JSP? (Hibernate Associations)

    - by Parris
    Hi All, So I am pretty new to JSP. I have tried this a few ways. Ways that would make sense in PHP or automagicy frameworks... I am probably thinking too much in fact... I have a hibernate one to many association. That is class x has many of class y. In class x's view.jsp. I would like to grab all of class y, where the foreign key of y matches the primary key of x and display them. It seems that hibernate properly puts this stuff into a set. Now, the question is how can I iterate through this set and then output it's contents... I am kind of stumped here. I tried to write a scriptlet, <% java.util.Iterator iter = aBean.getYs().iter(); // aBeans is the bean name // getYs would return the set and iter would return an iterator for the set while(iter.hasNext) { model.X a = new iter.next() %> <h1><%=a.getTitle()%></h1> <% } %> It would seem that that sort of thing should work? Hmmmmmm

    Read the article

  • JSP/Struts2/Hibernate: loop through a self-referencing table.

    - by TBW
    Hello everyone, Let's say we have a self-referencing table called PERSON, with the following columns: ID, PARENT, where PARENT is a foreign key to the ID column of another element in the PERSON table. Of course, many persons can have the same parent. I use Hibernate 3 in lazy fetching mode to deal with the database. Hibernate fetches a person element from the database, which is then put in the ValueStack by the Struts2 action, to be used on the result JSP page. Now the question is : In JSP, how can I do to display all the child (and the child's child, and so on, like a family tree) of this person element? Of course, for the n+1 children I can use the < s:iterator tag over the person.person. I can also nest another < s:iterator tag over person.person.person to get the n+2 children. But what if I want to do this in an automated manner, up to the last n+p child, displaying in the process all the children of all the n+1..n+p elements? I hope I have been clear enough. Thank you all for your time. -- TBW.

    Read the article

  • JSP - Beginner question , Bypass the if..statement on page load?

    - by TatMing
    i am new in JSP,i have some problem with the following code : <%@ page contentType="text/html;charset=Big5" %> <html> <head> <title></title> </head> <body> <form method="post" action="InsertStudent.jsp"> <input type="text" size="20" name="txtName" /> <input type="text" size="20" name="txtDob" /> <input type="text" size="20" name="txtProStudied" /> <input type="submit" name="B1" value="Submit" /> </form> <% if (request.getParameter("txtName") !="" && request.getParameter("txtDob") != "" && request.getParameter("txtProStudied") != "" ) { out.println("...bypass the if....statement"); } %> </body> </html> If run this code, the out.println will fire even the 3 input box have value or not..

    Read the article

  • How to call Java code from Javascript and assign a value to a JSP page?

    - by Frank
    I have the following "form.jsp" program, it generates a drop down list, below the list is a textarea to show the display_name of a selected item, now when user selected a item, it shows the selected item id in the textarea, how to call the DB from my code and get the display_name in the javascript so the result display_name will be shown in the textarea ? <%@ taglib prefix="s" uri="/struts-tags"%> <script type="text/javascript"> function callme(Display_Name) { alert('callme : Display_Name = '+Display_Name); var v=document.getElementById('hiddenValue').value; alert('hiddenValue : v = '+v); document.getElementById('defaultDisplayName').value=Display_Name; } </script> <s:hidden id="pricelist.id" name="pricelist.id" value="%{pricelist.id}"/> <div class="dialog"> <table> <tbody> <s:if test="%{enableProductList}"> <tr class="prop"> <td valign="top" class="name required"><label for="description">Product:</label></td> <td valign="top"> <s:select id="productPrice.product" name="productPrice.product" headerKey="0" headerValue="-- Select Product --" list="products" listKey="id" listValue="name" value="productPrice.product.id" theme="simple" displayName1='value' onchange="callme(value)" /> <s:hidden id="hiddenValue" name="hiddenValue" value="123"/> </td> </tr> </s:if> <tr class="prop"> <td valign="top" class="name"><label for="description">Default Display Name:</label></td> <td valign="top"><s:textarea id="defaultDisplayName" name="defaultDisplayName" theme="simple" readonly="true"/></td> </tr> See attached image for details, in the DB, a product table has the product Id and display_name, I know the Id, how to use Java to get the display_name and plug it into the jsp ?

    Read the article

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