Search Results

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

Page 25/74 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • How to show a client-side message with Java JSF/Tobago?

    - by Marcus
    I have a web application created with JSF and Tobago. The user types some date into a sheet and clicks a button (all within one sheet-row). Now my java class checks whether the data is correct or not. In case there are some problems, I would like to show up something like a messagebox containing the errormessage. I cannot use something like JDialog, since this would happen only server side. Every user independently of his location needs to get the message. I thought about setting the error information into a databean and having my jsp show up the message after reloading. But how can I achieve this? Is there something like a tag which can be used for this? Or can I use the "confirmation" facet for this? But how would I start it without having the user to do something? Thanks in advance!

    Read the article

  • Getting a popup help for an option in listview.

    - by Judy
    I have an interface with a listview of various options e.g 1)Asian 2) Euorpian 3)...... this listview is populated by calling JSP script that accesses this data (i.e. all options) from database. I want to have a small popup window (like any help window) to be displayed when I move mouse over( onmousemove function) any option. e.g when i put mouse over Asian then a small help sort of window display Indians,chinese,thai...etc. Can anyone suggest how to achieve this?

    Read the article

  • JSF - Session Bean restart on logout and login

    - by Ben
    Hi, I have a web application with a backing bean which has the context of the current logged in user. It is implemented on JSF. When the user logs out he is forwarded to a login screen (in another JSP page). I would like the current session to be erased when that happens and a new one to be created the next time the user logs in and enters the application. My question is - how do you delete a session? (I guess the new session will be created automatically the next time the user enters the link) This is kinda newb i guess, but I couldn't find a solution for this. Thanks for the Help!

    Read the article

  • How to call sql procedure from an html button?

    - by anand
    Hey guys, my doubt is pretty simple to understand. I have a sql procedure that generates a util file as its output depending on the input parameters that are passed to it. I have to pass these parameters from an html page from 3 text boxes.There will also be a button ,on clicking which, the procedure will be called and the util will be generated. I thought of doing it in jsp and writing the full procedure there itself. But i want to util file to opened in WORD the moment it is generated. I want to know how to call a procedure using button and how to show the util after its generated. Thanks guys, any help will be appreciated.

    Read the article

  • copy file from one location to another location in linux using java program

    - by Mouli
    Using JSP am trying to move customer logo into another location in linux but its not working. thanks in advance Here is my program String customerLogo = request.getParameter("uploadCustomerLogo").trim(); StringBuffer absoluteFolderPath = new StringBuffer(); absoluteFolderPath.append("/zoniac"); absoluteFolderPath.append("/Companies/"); absoluteFolderPath.append("companyCode/"); absoluteFolderPath.append("custom/"); String destination = absoluteFolderPath.toString(); File sourcefile = new File(customerLogo); File destfile = new File(destination+sourcefile.getName()); FileUtils.copyFile(sourcefile,destfile);

    Read the article

  • Doing a generic <sql:query> in Grails

    - by melling
    This is a generic way to select data from a table and show the results in an HTML table using JSP taglibs. What is the generic way to do this in Grails? That is, take a few lines of SQL and generate an HTML table from scratch in Grails, including the column names as headers. <sql:query var="results" dataSource="${dsource}" select * from foo </sql:query (# of rows: ${results.rowCount}) <table border="1" <!-- column headers -- <tr bgcolor=cyan <c:forEach var="columnName" items="${results.columnNames}" <th<c:out value="${columnName}"/</th </c:forEach </tr <!-- column data -- <c:forEach var="row" items="${results.rowsByIndex}" <tr <c:forEach var="column" items="${row}" <td<c:out value="${column}"/</td </c:forEach </tr </c:forEach </table The solution to this was answered in another StackOverFlow question. http://stackoverflow.com/questions/425294/sql-database-views-in-grails IF SOMEONE WRITES A GOOD ANSWER, I'LL ACCEPT IT. I would like a 100% acceptance on all of my questions.

    Read the article

  • How to use a servlet to repsond to a request for an object

    - by Rick
    I'm sure this is easy, but I don't work with website development very often and I'm lost on this one. I have a web application that needs to support multiple clients with different settings, icons and other content. The contents of these files are in separate directories for each client. What I would like to do is respond to a request sent to a jsp/java servlet. The servlet will look up the proper folder location in a database (I have the database stuff working) and send the actual object to the requesting page whether it is xml, graphic or video. How do I do that? What methods should I be using. Help I'm lost! :(

    Read the article

  • Form character encoding problems with special characters

    - by Enrique
    Hello I have a jsp with an html form. I set the content type like this: <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %> When I send special characters like á é í ó ú they are saved correctly in the database. My table charset is utf-8. I want to change iso-8859 to utf-8 like this to standardize my application and accept more special characters: <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> but when I change it to utf-8 the special characters á é í ó ú are not saved correctly in the databse. When I try to save á it is saved as á In the server side I'm using Spring MVC. I'm getting the text field value like this: String strField = ServletRequestUtils.getStringParameter(request, "field");

    Read the article

  • Pre-populating Radio Buttons with Java

    - by Gary Deuces Rozanski
    Is it possible to pre-populate a radio button, using jsp, depending on the value in the database? If so, how? I have done research here at StackOverflow & Google but with no real solution. p.s. I hope somebody can help me out with a question. As you will see from previous questions, I am not a developer, but get loaded with questions being the most technical on my team. oh the joy. Any help will be appreciated & I apologize in advance if my question is dumb.

    Read the article

  • Is there a Java equivalent for Ruby on Rails "url_for"?

    - by Oren Ben-Kiki
    I have written something like this pretty easily in C# (string GetUrl(new { controller = "foo", action = "bar", baz = "fnord" }), based on the existing capabilities of the XmlRouteCollection class provided by the ASP.NET MVC framework (why it isn't there out of the box is beyond me; the additional required code was trivial). I am now faced with a JSP project, and I need the same ability: centralize the logic for generating all URLs in one place, based on a list of routing rules. Is there some code somewhere I could reuse/adapt to do this in Java? It seems like a common enough requirement, but google proved surprisingly unhelpful in finding something like this.

    Read the article

  • How to pass values from client side to server side ?

    - by manojp1988
    Hi All, I got a situation to transfer values from jsp to servlet's action class. Previously we did it using <input type="hidden" id="name" value="manoj" /> we take this value in action class by request.getParameter("name"). But now we couldn't pass value like "Hi\n i am\n Manoj". Since it has new line included in the string we couldn't take it like this to action. So how I can take value like this to action or is there any way other than hidden input? Thanks .

    Read the article

  • Tomcat servlet-api.jar problem

    - by CitadelCSCadet
    I am running a web application using Tomcat and Java Servlets, JSP's, etc. I am aware that in order to use Servlets, it is dependent on the Servlet-api.jar file. Initially I placed this jar file in the WEB-INF/lib/ directory. This has worked fine for me for months during the developmental phase. When we put the application onto the server space we are using, we started seeing wierd problems showing up in the Catalina.out file telling us that there was dependency problems with the servlet-api.jar file. I am aware that tomcat has this jar file in its container, and that I should remove it from the WEB-INF/lib/ directory. I have tried this and it does not work. What do I have to do when I remove this jar file from the local files and allow it to depend on tomcats servlet-api.jar file.

    Read the article

  • Java: Convenient way to refactor the application.

    - by Harshal
    Hi, Everyone We have an agile enterprise application built on JSP and Servlet without any design strategy. This application was built in early 2002 considering 1000 users. After 2002, we received lots of requests from the marketing partners. Currently, the application has lots of spaghetti code with lots of Ifs and elses. One class has more than 20,000 lines of code with a huge body of functions without abstraction. Now, we need to support billions of records, what we need to do immediately and gradually? We have to refactor the application? Which framework, we need to use? How the usage of the framework will be helpful to the end users? How to convince the leaders to do the refactoring? How to gain the faster response time as compare to the current system?

    Read the article

  • req.getParameter returns values wrong character encoding

    - by coder247
    I'm trying to get values from a JSP using getParameter which includes ü,é,à etc. But get wrong values in servlet. I've checked the content type with firebug and found that Content-Type text/html;charset=UTF-8 checked the POST section with firebug and found the correct value there, when I try to access it in servlet it is wrong. Gives ö instead of ö req.getCharacterEncoding(); returns null. Tried with setting req.setCharacterEncoding("UTF-8"); at the beginning of servlet but didn't help.

    Read the article

  • Using static strings to define input field names in JSPs - good idea or not?

    - by Derek Clarkson
    Hi all, I've just be asked to work on a large portal project and have been looking through the established code. I keep finding this in the jsps: <input class="portlet-form-button" name="<%=ModifyUserProfile.FORM_FIRST_TIME_LOGIN_SUBMIT%>" type="submit" ... The authors are using static strings defined in classes to define the names of input fields and buttons in jsp forms. I've never seen this done before and was wondering if this is common practice. I'm inclined to think not, but I'm asking because, apart from centralising names which I would have thought are not likely to change, I can't see the reason why. Any thoughts on this?

    Read the article

  • Special characters incongruence

    - by Enrique
    Hello I'm building a Spring MVC web application that runs on Tomcat 6.0.20 and JDK 1.6.0_19. When I send some special characters through an HTML form some of them are stored as question marks ? For example these symbols are stored correctly: €, á, é, í, ‰, etc But some symbols are replaced with ? like: £, ?, ? MySQL tables charset is utf-8. My jsp also use utf-8 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> I have included org.springframework.web.filter.CharacterEncodingFilter in web.xml as suggested here When I debug the POST request when sending 3 characters €a£ with firebug I get: %E2%82%ACa%E2%82%A4 which is correct since E2 82 AC is the code for € and E2 82 A4 is the code for £ but £ is stored as ? in the database. When I save £ directly into the database it is displayed correctly in the webpage. How can I fix this?

    Read the article

  • MVC Framework for existing application.

    - by Dhruva
    I am modifying existing java web application that was written long time ago, and it is written in the wrost possible way. It has business logic and sql statemens in JSP files. Because of the certain constraint, I can not re-design the entire application. but I can implement better design in any new feature that I add. can anybody suggest me any MVC framework that I could easily integrate in existing app. I need to have framework that is not depended on many external jar files and it does not cause any issues with existing application.

    Read the article

  • JavaScript Validation

    - by Sandeep Pathak
    Have a text field in the jsp which shows and takes input for ftp Url like below : ftp://ftplog:*****@10.203.291.177/abc/DS/Simulator/B11/B11/L2 The password field above is masked . Now when user tries the edit say ftp to sftp or File Path , He should re-type the password too , other wise What I will be getting in server is only "*" . Can somebody suggest the best way of validating this . It has a lot of test cases that has to be taken care of . Thanks .

    Read the article

  • How to get the action from the HttpServlet request to dispatch to multiple pages

    - by JFB
    I am using the Page Controller pattern. How could I use the same controller for two different pages by detecting the request action and then dispatching according to the result? Here is my code: account.jsp <form name="input" action="<%=request.getContextPath() %>/edit" method="get"> <input type="submit" value="Modifier" /> </form> Account Servlet public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("received HTTP GET"); String action = request.getParameter("action"); if (action == null) { // the account page dispatch(request, response, "/account"); } else if (action == "/edit") { // the popup edit page dispatch(request, response, "/edit"); } protected void dispatch(HttpServletRequest request, HttpServletResponse response, String page) throws javax.servlet.ServletException, java.io.IOException { RequestDispatcher dispatcher = getServletContext() .getRequestDispatcher(page); dispatcher.forward(request, response); } }

    Read the article

  • How to convert an arbitrary object to String with EL? (calling toString())

    - by hstoerr
    Is there any way to call toString() on an object with the EL? (I need the String representation of an enum as index in a map in a JSP EL expression.) I hoped something like ${''+object} would work like in java, but EL isn't that nice, and there does not seem to be any function that does it. Clarification: I have a variable somemap that maps Strings to Strings, and I have a variable someenum that is an enumeration. I'd like to do something like ${somemap[someenum.toString()]}. (Of course .toString() does not work, but what does?)

    Read the article

  • Mixing expressions and expression language (<%= %> inside of c:if)

    - by Jack
    I need to access some constants in my jsp, and sadly the EL does not offer any functionality for it. There are some options like the unstandard tag library, but I'd like to keep it a bit more standard. I tried: <%@ page import = "com.jackdane.Constants"%> <c:if test="${object.display == '<%=com.jackdane.Constants.YES %>}'"> //some display logic </c:if> But that doesn't appear to do the trick. It's been a while since I've used an expression so I might have made an error. Any input is appreciated. Edit: To clarify, the constants class is not in my control. It's inside a jar file that I recieved. It contains no getters/setters. Just private static final Strings.

    Read the article

  • outlook calendar connectivity with java web service

    - by Isisagate
    We currently have a java/jsp online web service that includes it's own custom calendar. I am trying to do some research into the possibility of connecting it to a users outlook. Our basic needs that are most simple is some way to sent the person a meeting request that can be added to their outlook from our service. I know the ideal solution is to sync back and forth but simply being able to import the data from our calendar into someone's outlook would be sufficient. Does anyone have any resources they can point me to that might help with information gathering, or any example/comments?

    Read the article

  • Does every browser open a new HTTPSession

    - by user496934
    I am working on a webbased application which has JSP and servlets. In my application, I am binding some objects to sessions like the following code -- HttpSession session = p_req.getSession(); session.setAttribute(DOWNLOAD_With_WARNINGS, downloadMap); Later I am retrieving them using session.getAttribute. I would like to know if every time I open a new browser does it open a new HTTP session. Because , if I do a setAttribute with some value in one browser instance, that change is visible when I do a getAttribute using the other browser instance.

    Read the article

  • @ExceptionHandler doesn't handle the thrown exceptions

    - by Javi
    Hello, I have a method in my controller which will handle the exceptions thrown by the application. So I have a method like this one. @Controller public class ExceptionController { @RequestMapping(value="/error") @ExceptionHandler(value={Exception.class, NullPointerException.class}) public String showError(Exception e, Model model){ return "tiles:error"; } } And to try I if it works I throw a NullPointerException in another method in other method controller: boolean a = true; if(a){ throw new NullPointerException(); } After the exception is thrown it is printed in the JSP, but it doesn't go throw my showError() method (I've set a breakpoint there and it never enters). showError() method will catch the exception and will show different error pages depending on the exception type (though now it always shows the same error page). If I go to the url /error it shows the error page so the showError() method is OK. I'm using Spring 3. What can be the problem? Thanks.

    Read the article

  • reload a form with the same parameter of the previous

    - by kawtousse
    Hi every one, I have really a problem that I don't know how to deal with it. I am using JSP and Servlet with the Eclipse IDE. First of all, the user fill an html table with the values that he has selected and written in the form. after that he will find his parameters displayed in the html table. the problem now is : the table contains in each row an edit button when clicking on it; the user should have the form automatically filled with values"previously selected" of the row. so it's how to reload the form with variables from html table. Note : I construct the table with a servlet. Please help.

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >