Search Results

Search found 2126 results on 86 pages for 'jsp fragments'.

Page 35/86 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • username is not available on the welcome page

    - by user640893
    identify the reason why the username is not being displayed on the welcome page using the following code? String custId = (String) session.getAttribute("customerId"); String emailId = (String) session.getAttribute("emailId"); String phoneNumber = (String) session.getAttribute("phoneNumber"); <body> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <p>&nbsp;</p> <table width="70%" align="center" border="1"> <tr> <td align="center">Welcome to Going Green !</td> </tr>

    Read the article

  • tomcat memory issue

    - by lalchand
    I am having more than 150 web applications in my tomcat web-apps directory can these be the one of the reason for increase in memory usage. i have installed tomcat as a service .

    Read the article

  • display tag scope issue with pagination

    - by sarah
    Hi All, I am using display tag for pagination ,i am reading the list from request scope and displaying it,i have kept the page size as 1 and the list hast 4 values,if i press next i get nothing to display this is the case with request scope but not with session scope how can i tackle this problem?

    Read the article

  • how to deal with international time?

    - by alex
    i build a new website.but the host is in USA.i am not in USA. i need get the time on the website page to compare with one local Variable. But because of time difference,it has 8 hous difference?how to solve this problom? my code SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss"); java.util.Date currentTime = new java.util.Date(); String dateString = formatter.format(currentTime); ` how to revise these code ?

    Read the article

  • Cannot connect to mysql via servlet

    - by JBoy
    Hi all I have been since 2 days trying to figure out why my servlet does not connect to the database MySql. I have mysql installed and working properly and eclipse. Whenever i try to etabilish a connection i get the ClassNotFoundException for the com.mysql.jdbc.Driver, which is actually properly imported, the connector i'm using is the mysql-connector-java5.1.14 added properly as external jar so everything seems fine. here's my code protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String dbUrl="jdbc:mysql://localhost:3306/test"; String username="root"; String password=""; try { Class.forName("com.mysql.jdbc.Driver").newInstance(); conn=DriverManager.getConnection(dbUrl); System.out.println("Connected!"); } catch (SQLException e) { e.printStackTrace(); System.out.println("not connected"); } catch(ClassNotFoundException x){ x.printStackTrace(); } catch(Exception e){ e.printStackTrace(); } } The stacktrace(part of): java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:164) i'm following the connection steps from a published java book and also in forums and tutorials i just see the same code, cannot figure out why that Exception comes. On a normal application which does not run on the server the Exception isn't thrown and the connection (in the exact same way) its successfull. Do you have any advice?

    Read the article

  • Java servlet's request parameter's name set to entire json object

    - by Geren White
    I'm sending a json object through ajax to a java servlet. The json object is key-value type with three keys that point to arrays and a key that points to a single string. I build it in javascript like this: var jsonObject = {"arrayOne": arrayOne, "arrayTwo": arrayTwo, "arrayThree": arrThree, "string": stringVar}; I then send it to a java servlet using ajax as follows: httpRequest.open('POST', url, true); httpRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); httpRequest.setRequestHeader("Connection", "close"); var jsonString = jsonObject.toJSONString(); httpRequest.send(jsonString); This will send the string to my servlet, but It isn't showing as I expect it to. The whole json string gets set to the name of one of my request's parameters. So in my servlet if I do request.getParameterNames(); It will return an enumeration with one of the table entries' key's to be the entire object contents. I may be mistaken, but my thought was that it should set each key to a different parameter name. So I should have 4 parameters, arrayOne, arrayTwo, arrayThree, and string. Am I doing something wrong or is my thinking off here? Any help is appreciated. Thanks

    Read the article

  • Simple servlet or filter to process form

    - by David
    Is there a simple framework for processing form submissions via a servlet? For my needs, a framework like STRUTS seems like over kill. My ideal processor would be a servlet that converts form elements into a bean object, possibly using typing information in the form to help with the conversion. Does something like this exist or is there another solution out there geared toward simpler needs? Thanks!

    Read the article

  • How to trigger the specific controller action using a button?

    - by Eugene
    I'm creating a simple training project. I've implemented a controller method, which deletes an item from the list. The method is looking like this: @Controller @RequestMapping(value = "/topic") public class TopicController { @Autowired private TopicService service; ... @RequestMapping(value = "/deleteComment/{commentId}", method = RequestMethod.POST) public String deleteComment(@PathVariable int commentId, BindingResult result, Model model){ Comment deletedComment = commentService.findCommentByID(commentId); if (deletedComment != null) { commentService.deleteComment(deletedComment); } return "refresh:"; } } This method is called from the button-tag, which is looking in the following way: _form> _button formaction = "../deleteComment/1" formmethod = "post">delete_/button> _/form> Sorry, but in the form tag I've changed all the '<' characters with the '_', because the tag was invisible. In my project the form-tag is looking like a cliuckable button. But there is a serious problem: controller's method is never triggered. How can I trigger it, using a button-tag? P.S. the call is performed from the page with URI http://localhost:8080/simpleblog/topic/details/2 and controller's URI is the http://localhost:8080/simpleblog/topic/deleteComment/2

    Read the article

  • displaying a physical webpage with frames in iframe

    - by ksa
    i have iframe in my webpage, i have done the coding part for browsing the folders and viewing files in iframe.each folder has a index.html.now i need to display the index.html in iframe.index.html page contains frames divided into 2,each from different sources.i tried to display a sample webpage without frames and it was a success,page with frames spoils the party. my code for getting the html file <% String path=request.getParameter("name"); File directory = new File(path); FileFilter fileFilter=new FileFilter() { @Override public boolean accept(File file) { return file.getName().endsWith("html"); } }; File[] files = directory.listFiles(fileFilter); for (int index = 0; index < files.length; index++) { String s= files[index].getName(); String s1=files[index].getAbsolutePath(); %> <a href="fileview?name=<%=s1%>" target="sss"><%=s%></a> <% } %> mycode for displaying the page in iframe. public void doGet(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException { res.setContentType("text/html"); PrintWriter out=res.getWriter(); String name=req.getParameter("name"); res.setHeader("Content-Disposition", "inline; filename=\""+name+"\""); java.io.FileInputStream fis=new java.io.FileInputStream(name); int i; while((i=fis.read())!=-1) { out.write(i); } fis.close(); out.close(); }

    Read the article

  • Can't referr to my get method

    - by chility
    I have this amazing and good looking class: public class SayingsHolder extends Application{ ArrayList<String> SayingsList = new ArrayList<String>(){{ SayingsList.add("1"); SayingsList.add("2"); }}; public ArrayList<String> getSayingsList() { return SayingsList; } } Now I'm trying to call the getSayingsList method inside of my activity's FragmentStatePagerAdapter by: private class ScreenSlidePagerAdapter extends FragmentStatePagerAdapter { final SayingsHolder holder = (SayingsHolder).getApplication(); } Everything fine for now, but when I make my code like this: private class ScreenSlidePagerAdapter extends FragmentStatePagerAdapter { final SayingsHolder holder = (SayingsHolder).getApplication(); holder.getSayingsList(); } it says: Syntax error on token "getSayingsList", Identifier expected after this token The problem is that holder is not functional at all. What I mean is that when i type the this holder. the getSayingsList is not showing at all. What am I missing here? I know that it is an extremely small issue, but it seems that I can't spot it. My activity extends FragmentActivity if it's important It seems that I'm missing something here. I can't call my method anywhere in my activity. I'm starting a bounty, because I need an example.

    Read the article

  • Is existed web markup languages with possibility insert sql query?

    - by MercurieVV
    Actually what I want - simple DB with simple User Interface. Like MS Access, but for web and it can be without Dragn n Drop, but described with markup language. For example if I want to create list report, then i need to write something like: <table query="SELECT * from mytable"></table> It needed for simple data applications. In that kind application no programming logic required. Just working with DB. Changing DB data and showing it.

    Read the article

  • Evaluate empty or null JSLT c tags

    - by user338381
    How can I validate a String null or empty using the c tags of JSLT. I have a variable of name var1 and I can display it, but I want to add a comparator for validate it. I want to validate when is different of null or empty (my values are string).

    Read the article

  • problem in Printing A Webpage

    - by moustafa
    There Is A Date Picker Code In my Program (Of Course We Placed A Calendar Picture In The Web Page) The Problem Now Is That How Can We Be Able Not To Include The Picture Of The Calendar Picture In Printing?

    Read the article

  • Radiobutton validation.

    - by _sh
    The question is on the client side validation using java script. Significant parts of the program related to the question are given below.. ... <form name="results" action="" method="post"> ... <input type="radio" name="id" value="<%= id_edit %>" /> <!-- Don't bother about id_edit --> .... <input type="button" name="Edit" value="Edit" onclick="invoke(0)"><input type="button" name="Delete" value="Delete" onclick="return invoke(1)"> .... The script, function invoke(btn) { if(btn == 0) document.results.action="gev.do"; if(btn == 1) document.results.action="del.do"; document.results.submit(); } What basically i do is, depending on the selection of button, i pass a value to the servlet, either for updation or deletion. My question is, how can i validate the radiobutton, ie, i can any one help me out writing the js to validate if any one of the radio button is selected. All my efforts are in vein and i now use server side validation.

    Read the article

  • How to connect ejb to hibernate in eclipse and glassfish server?

    - by agiles
    I am newer to ejb and hibernate and don't have any idea to how to link or connect those technologies mentioned above. I have just created individual module for ejb, hibernate and servlet. but I need to pass the data from servlet to ejb and then ejb to hibernate and store into MySql database. Problem for me, how to connect ejb to hibernate. I tried some ways and it couldn't work for me. Please someone help me. Thank you

    Read the article

  • Is the web still 100% Stateless?

    - by coffeeaddict
    Is the web sill 100% stateless? Before you start to say "of course it is, wtf" listen to what I'm saying here. I'm starting to wonder about this because web servers are definitely caching things, keeping connections open in connection pools, etc. So you can't really stay it's 100% stateless anymore. Am I right on this?

    Read the article

  • Do I need to know servlets and JSP to learn spring or hibernate or any other java web frameworks?

    - by KyelJmD
    I've been asking a lot of people where to start learning java web development, I already know core java (Threading,Generics,Collections, a little experience with (JDBC)) but I do not know JSPs and servlets. I did my fair share of development with several web based applications using PHP for server-side and HTML,CSS,Javascript,HTML5 for client side. Most people that I asked told me to jump right ahead to Hibernate while some told me that I do not need to learn servlets and jsps and I should immediately study the Spring framework. Is this true? do I not need to learn servlets and JSPs to learn hibernate or Spring? All of their answers confused me and now I am completely lost what to learn or study. I feel that if I skipped learning JSP and servlets I would missed a lot of important concepts that will surely help me in the future. So the question, do I need to have foundation/know servlets and JSP to learn spring or hibernate or any other java web frameworks.?

    Read the article

  • Passing JSON object from Controller to View(jsp)

    - by user752233
    I am trying to send JSON object to my view from controller but unable to send it. Please help me out! I am using following code public class SystemController extends AbstractController{ protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { ModelAndView mav = new ModelAndView("SystemInfo", "System", "S"); response.setContentType("application/json;charset=UTF-8"); response.setHeader("Cache-Control", "no-cache"); JSONObject jsonResult = new JSONObject(); jsonResult.put("JVMVendor", System.getProperty("java.vendor")); jsonResult.put("JVMVersion", System.getProperty("java.version")); jsonResult.put("JVMVendorURL", System.getProperty("java.vendor.url")); jsonResult.put("OSName", System.getProperty("os.name")); jsonResult.put("OSVersion", System.getProperty("os.version")); jsonResult.put("OSArchitectire", System.getProperty("os.arch")); response.getWriter().write(jsonResult.toString()); // response.getWriter().close(); return mav; // return modelandview object } } and in the view side I am using <script type="text/javascript"> Ext.onReady(function(response) { //Ext.MessageBox.alert('Hello', 'The DOM is ready!'); var showExistingScreen = function () { Ext.Ajax.request({ url : 'system.htm', method : 'POST', scope : this, success: function ( response ) { alert('1'); var existingValues = Ext.util.JSON.decode(response.responseText); alert('2'); } }); }; return showExistingScreen(); });

    Read the article

  • File upload help in JSP /Struts 1.2

    - by user57421
    Hi All, I have seen lot of reviews and have not been able to figure out how I can solve my problem.. Problem: Currently we have a page to upload the file from local machine to the respositry. It is currently using Struts upload. Now the current requirment is, Since users upload around 1gb of file, they are made to wait for a long time.. So they changed the requirment to browse the file and select the file to upload and hitting upload button should return to the control to next screen imediately.. But the upload process some how needs to be pushed at the backend and should do the upload and send out an email once the upload is complete.. I'm not able to figure out how to transfer the control to next page, when the upload is still running ... any idea or help will be appreicated.. Regards, Senny

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >