Search Results

Search found 33640 results on 1346 pages for 'java generics'.

Page 167/1346 | < Previous Page | 163 164 165 166 167 168 169 170 171 172 173 174  | Next Page >

  • Which Java MVC frameworks integrate easily with StringTemplate?

    - by Daniel Jomphe
    It's hard to see how StringTemplate integrates easily (or not) with popular Java web MVC frameworks. Which Java MVC frameworks integrate easily with StringTemplate? A good answer: mentions one solution to integrate with a framework, includes a link to something useful and applicable, like: a tutorial, or documentation, or a reference to source code: free, and open source or public domain. Readers/Voters, please vote for a solution if you know it's true and great. In the scope of this question, I am not interested in any other templating engine than StringTemplate.

    Read the article

  • Google appEngine: 404 when accesing /_ah/api

    - by jfu
    I try to build a very simple GAE application, using eclipse and the Google Plugin for Eclipse. I've generated some Endpoint from an @Entity class, then I've generated Cloud Endpoint Client library. After that I've started the appEngine project (within eclipse, on the embedded jetty server). When I try to access /_ah/api I get the following issue: HTTP ERROR 500 Problem accessing /_ah/api/. Reason: Failed to retrieve API configs with status: 404 Caused by: java.io.IOException: Failed to retrieve API configs with status: 404 at com.google.api.server.spi.tools.devserver.ApiServlet.getApiConfigSources(ApiServlet.java:102) at com.google.api.server.spi.tools.devserver.ApiServlet.initConfigsIfNecessary(ApiServlet.java:67) at com.google.api.server.spi.tools.devserver.RestApiServlet.service(RestApiServlet.java:117) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at com.google.appengine.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:123) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:34) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:63) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:125) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectRequest(DevAppServerModulesFilter.java:368) at com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectModuleRequest(DevAppServerModulesFilter.java:351) at com.google.appengine.tools.development.DevAppServerModulesFilter.doFilter(DevAppServerModulesFilter.java:116) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) What am I doing wrong?

    Read the article

  • Java program runtime error

    - by Sam
    public class BooksTestDrive { public static void main(String[] args) { Books [] myBooks = new Books[3]; int x=0; myBooks[0].title = "The Grapes of Jave"; myBooks[1].title = "The Java Gatsby"; myBooks[2].title = "The Java Cookbook"; myBooks[0].author = "bob"; myBooks[1].author = "sue"; myBooks[2].author = "ian"; while (x < 3) { System.out.print(myBooks[x].title); System.out.print("by"); System.out.println(myBooks[x].author); x = x+1; } } } This code compiles but while runtime, its giving nullpointer exception.

    Read the article

  • how to upload a audio file using REST webservice in Google App Engine for Java

    - by sathya
    Am using google app engine with eclipse IDE and trying to upload a audio file. I used the File Upload in Google App Engine For Java and can able to upload the file successfully. Now am planning to use REST web service for it. I had analyzed in developers.google but i failed. Can anyone suggest me how to implement REST Web services in google app engine using Eclipse. The code google provided is shown below, // file Upload.java public class Upload extends HttpServlet { private BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService(); public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { Map<String, BlobKey> blobs = blobstoreService.getUploadedBlobs(req); BlobKey blobKey = blobs.get("myFile"); if (blobKey == null) { res.sendRedirect("/"); } else { res.sendRedirect("/serve?blob-key=" + blobKey.getKeyString()); }}} // file Serve.java public class Serve extends HttpServlet { private BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService(); public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException { BlobKey blobKey = new BlobKey(req.getParameter("blob-key")); blobstoreService.serve(blobKey, res); }} // file index.jsp <%@ page import="com.google.appengine.api.blobstore.BlobstoreServiceFactory" %> <%@ page import="com.google.appengine.api.blobstore.BlobstoreService" %> <% BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService(); %> <form action="<%= blobstoreService.createUploadUrl("/upload") %>" method="post" enctype="multipart/form-data"> <input type="file" name="myFile"> <input type="submit" value="Submit"> </form> // web.xml <servlet> <servlet-name>Upload</servlet-name> <servlet-class>Upload</servlet-class> </servlet> <servlet> <servlet-name>Serve</servlet-name> <servlet-class>Serve</servlet-class> </servlet> <servlet-mapping> <servlet-name>Upload</servlet-name> <url-pattern>/upload</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Serve</servlet-name> <url-pattern>/serve</url-pattern> </servlet-mapping> Now how to provide a rest web service for the above code. Kindly suggest me an idea.

    Read the article

  • The conventional location for storing my Java libraries and applications in UNIX based systems

    - by Bytecode Ninja
    I usually store the Java applications and JAR files that I download from the Web in the ~/Java folder on my computer (an OS X machine). I have been doing this since the days when I was a Windows user. However I think in UNIX based systems user local apps are conventionally stored in another directory. I have a feeling that this directory should either be /usr/local/, /usr/local/USERNAME, /opt/local, or /opt/local/USERNAME but I am not sure. Any ideas which directory can I use for this purpose? Please note that, I am talking about archive files that I download from the Web, unpack and use locally and not programs that have installation scripts or MacPorts, etc.

    Read the article

  • Java: how to get mercurial current changeset number for use in program

    - by Rabarberski
    I've recently started using mercurial for version control in a Java project. When I run my program, the input parameters it has used to produce certain a output, are written to a specific file. It would be nice if I could add the current mercurial changeset number (indicating the version of my program) to that output file as well. What would be the easiest way to do so on Windows? I could write a simple Java parser to fetch the output of the first line of the hg log -l 1 command, but perhaps there is an easier way (i.e., less code lines)?

    Read the article

  • flipping 2d components in java

    - by aniket
    i am trying to flip a pentahex (5 hexagons joined at their sides). Is it possible to do so in Java? I mean suppose 2 of the 3 hexagons are in one quadrant can I change their quadrant? It is similar to what we do to flip images in Paint. The same utility I am trying to perform in Java. I have heard about Affine transform wherein it makes use of a bit called TYPE_FLIP, but I am not sure how to use it. Any small example would be of great help. Note: I do not want to flip images, but actual 2D objects.

    Read the article

  • Java stop MIDI playback

    - by user456268
    Hi I have java application which plays midi messages from sequence. I'm doing this using jfugue library. the problem is when I'm tryingto stop playback with stop button (which call sequencer.stop() and sequencer.close()) the last played note is sound all of rest time, and I can't stop it. So I'm asking about solution about stopping all audio and MIDI too! sound playback from java application. Notice: If you want propose just mute volume, you need to know that I want end-use will be able to press play button again and hear the sound again, so muting volumr will be not a solution, or explain please. Thank you!

    Read the article

  • SSL and Tomcat using Java

    - by Marquinio
    Hello all, I'm new to SSL connections so here goes my question. I have a desktop Java program in a JAR file. This JAR sends sensitive information over the internet to a remote Tomcat server. Of course I need to encrypt the data. If I purchase an SSL cerfiticate say from Verisign, will the data sent over SSL be automatically encrypted? I mean in my JAR, will I still need to do extra work like use Java encryption extensions API to manually encrypt my data over the SSL connection? Thank you.

    Read the article

  • How to run AWS sample JAVA code on an EC2

    - by SeaPlusPlus
    I just started with Amazon web services, and I have an EC2 instance. I downloaded the JAVA SDK and the Eclipse toolbox. I am able to run a sample program locally on my PC and connect to the Amazon databases, etc. My question is, what do I need to do to get this working on my EC2 instance? This may not even be specific to AWS. On Eclipse, I can just "Run as Application" and run any code. On the server side, what do I need to do? Should I ftp over my .java files? Should I export it to a jar and upload that? Do I need to install anything special to actually run it? I'm just trying to run the basic DynamoDB example that connects to the database and adds a new table and row

    Read the article

  • How to strore Java Date to Mysql datetime...?

    - by user275843
    can any body tell me how can i store Java Date to Mysql datetime...? when i am trying to do so...only date is stored and time remain 00:00:00 in mysql date stores like this... 2009-09-22 00:00:00 i want not only date but also time...like 2009-09-22 08:08:11 please help me.... EDIT---- i am using JPA(Hibernate) with spring mydomain classes uses java.util.Date but i have created tables using handwritten queries... this is my create statement CREATE TABLE ContactUs (id BIGINT auto_increment, userName VARCHAR(30), email VARCHAR(50), subject VARCHAR(100), message VARCHAR(1024), messageType VARCHAR(15), contactUsTime datetime, primary key(id))TYPE=InnoDB;

    Read the article

  • Downloading From Google Docs

    - by jeremynealbrown
    Hello, I am using the gdata-java-client Version 2 with for and Android app that allows users to download documents from their Google Docs account. Currently I am able to authenticate, request and display a list of all the user's documents. From here I would like to open each type of document in a specific Activity. If it's a spreadsheet or a csv file, open it in one activity and if it is a text document open it in another activity. This is where things are getting hazy. First I need to determine what type of document the user selected in order download the file in the appropriate format by appending exporFormat=(csv,xls,doc,txt) to the query string. I don't see any indication in the original list of documents as to what kind of file the each entry is. Secondly as a test I can just append a raw string to the end of the query string. As an example, a query might look like this: https://spreadsheets.google.com/feeds/download/spreadsheets/Export?key=0AsE_6_YIr797dHBTUWlHMUFXeTV4ZzJlUGxWRnJXanc&exportFormat=xls Notice that at the end of the string is the hardcoded export format. This query returns a HTTPResponse with a 200 OK message. However if I look at the response.content or use response.parseAsString I see what appears to be a Google Docs home page has html text. I don't get this result when I try to download a text document. When I request a text document the response.content is the body of the text file. If I copy and paste this uri into a browser I get the requested file as a download. To summarize, this question is two-fold: 1. How do I determine the type( plain text, .doc, .csv, .xls ) of a document from the initial list of user documents. 2. How do I download the actual .csv or spreadsheet files? Thanks in advance.

    Read the article

  • What is the Fastest Java/PHP Bridge?

    - by The Rook
    A bi-directional communication is required between a Java application and a PHP web app. A Fast and low Resource consumption is the number 1 priority in this project There is the PHP/Java Brdige(PJB) project and there are benchmarks to show that is very fast. Do you know of a faster approach? xml over http strikes me as a bit wasteful, but I don't know of a better approach. Ideally this system would be a remote connection, but due to time constraints it might have to be local. Do you know of a fastest way to accomplish this bi-directional connection?

    Read the article

  • how to run the dependecy class file in java

    - by Manu
    I have created Excel Sheet using java program.It works fine. My problem is, i have copied the .class file into other directory with the necessary jar files need to create this excel sheet, for example my .class is inside "pack" package. c:/myprogram/pack/excelprogram.class to d:/myprogram /pack/excelprogram.class /jxl.jar /ojdbc14.jar if i run the program javac pack.excelprogram it display below error Caused by: java.lang.ClassNotFoundException: jxl.format.CellFormat i have dependency jar file(jxl.jar) for this excel sheet creation.Error is displaying from that only. i have set class path for this jar file like set classpath="%classpath%";d:/myprogram/jxl.jar;d:/myprogram/ojdbc14.jar;.; even though i'm getting the same error. Please help ASAP.

    Read the article

  • Java date processing

    - by Don
    Hi, Given an instance of java.util.Date which is a Sunday. If there are 4 Sundays in the month in question, I need to figure out whether the chosen date is 1st Sunday of month 2nd Sunday of month 2nd last Sunday of month Last Sunday of month If there are 5 Sundays in the month in question, then I need to figure out whether the chosen date is 1st Sunday of month 2nd Sunday of month 3rd Sunday of month 2nd last Sunday of month Last Sunday of month I've had a look in JodaTime, but haven't found the relevant functionality there yet. The project is actually a Groovy project, so I could use either Java or Groovy to solve this. Thanks, Donal

    Read the article

  • How do I write a Java text file viewer for big log files

    - by Hannes de Jager
    I am working on a software product with an integrated log file viewer. Problem is, its slow and unstable for really large files because it reads the whole file into memory when you view a log file. I'm wanting to write a new log file viewer that addresses this problem. What are the best practices for writing viewers for large text files? How does editors like notepad++ and VIM acomplish this? I was thinking of using a buffered Bi-directional text stream reader together with Java's TableModel. Am I thinking along the right lines and are such stream implementations available for Java?

    Read the article

< Previous Page | 163 164 165 166 167 168 169 170 171 172 173 174  | Next Page >