java-ee

Uploading a file, Spring MVC + CloudBees

半城伤御伤魂 提交于 2019-12-25 16:42:39
问题 I have worked on local Tomcat's server and now I've just deployed my application to CloudBees. Everything works great apart from uploading a file to the server's directory. I have such a piece of code in my controller, which worked for me on localhost: @RequestMapping("/main/admin/upload") public ModelAndView fileUploaded( @ModelAttribute("uploadedFile") FileUpload uploadedFile, final HttpServletRequest request, final HttpServletResponse response, BindingResult result) { InputStream

Exception in thread “main” javax.xml.bind.UnmarshalException

十年热恋 提交于 2019-12-25 14:38:17
问题 I am a .NET Developer learning Java. Please see the code below: The class HelloWorld import javax.ws.rs.core.Context; import javax.ws.rs.core.UriInfo; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PUT; import javax.ws.rs.core.MediaType; @Path("generic") public class HelloWorld { @Context private UriInfo context; public HelloWorld() { } @GET @Produces("application/xml") public String

A JMS XA connection factory injected using spring jee-jndi lookup behaves differently than @Resource injection on Weblogic 12c

这一生的挚爱 提交于 2019-12-25 14:29:27
问题 I have an MDB application recently ported to Weblogic 12c. I use spring 3.1 to inject datasource and jms resources however have found that delivery of message queues does not succeed (without error), appearing to not participate in the XA transaction although no rollback is evident. I have since created a test app to isolate the issue. This test app contains: session timer bean putting message on testQueue1 MDB1 updating the datasource and moving message from testQueue1 to testQueue2. My

Http 403 - Forbidden error

*爱你&永不变心* 提交于 2019-12-25 14:01:46
问题 I have a problem accessing my simple web application. I have developed hello world application which is inside index.html. This is defined in welcome-file-list in web.xml file. On deploying my web application through eclipse into weblogic 12C, it is deployed. I'm able to see my application deployed using weblogic admin gui console. But when I try to access the application (i.e) helloworld page, I get the following error displayed in a web page. Error 403--Forbidden From RFC 2068 Hypertext

Http 403 - Forbidden error

孤人 提交于 2019-12-25 14:01:05
问题 I have a problem accessing my simple web application. I have developed hello world application which is inside index.html. This is defined in welcome-file-list in web.xml file. On deploying my web application through eclipse into weblogic 12C, it is deployed. I'm able to see my application deployed using weblogic admin gui console. But when I try to access the application (i.e) helloworld page, I get the following error displayed in a web page. Error 403--Forbidden From RFC 2068 Hypertext

performance issue to load huge records in a single jsp page

坚强是说给别人听的谎言 提交于 2019-12-25 13:14:47
问题 I stored huge(above 20000) records in StringBuffer for displaying in a jsp. I used StringBuffer to store in servlet and pass this as request attribute to jsp. The problem is that it takes too mush time to load all the records. After loaded, the browser is getting slow. Is there any best way to load huge records in a single jsp page ? or otherwise how to read data from StringBuffer fastly? 回答1: I'm pretty sure the problem doesn't come from the StringBuffer or from the HTML code generation by

Running EJB 2.1 on Wildfly 10

旧街凉风 提交于 2019-12-25 11:01:10
问题 I want to run EJB 2.1 with Wildfly-10 AS I have a server running on jBoss-EAP-6.2 Following are the configuration xml files I wanna achieve to run a Web Module (JSF) with existing server (EJB 2.1) running on JBoss-EAP-6.2. Following are the ideas I can run JSF on JBoss-EAP-6.2 (possible?) that can communicate with EJB within the server Deploy JSF on wildfly and it communicate with EJB through JBoss-EAP-6.2 MORE / FINDINGS while deploying JSF on JBoss-6, I am getting blank page on opening,

Java EE and JPA under Glassfish, NoClassDefFound com/mysql/jdbc/ResultSetMetaData

末鹿安然 提交于 2019-12-25 10:50:16
问题 I have a problem when I acces my MySql Database from an EJB. After deploying my EAR to the Glassfish server, and calling the method that use the entity class I get an exception like this: java.lang.NoClassDefFoundError: com/mysql/jdbc/ResultSetMetaData I am using a local MySql Database, the connection to these still works. To acces the tables of these Databese I am using entity classes generated by Netbeans. This classes are situated in external Library (OthelloLibrarie). Here you can also

Blank page opening after running a project in openshift

江枫思渺然 提交于 2019-12-25 10:29:29
问题 I have deployed a web application in openshift. Although build and deployment was successful, I am getting a blank page on clicking the application : http://adoreindia-adoreindia.a3c1.starter-us-west-1.openshiftapps.com/ Below is the pom.xml. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org

c:foreach inside h:datatable to show two dimensional array

偶尔善良 提交于 2019-12-25 09:36:39
问题 I am trying to use h:datatable tag to display values of two-dimensional int array. But cannot make it. Could help me with a solution? So my backing bean is: public class MC { ........... public int[][] getAr() { return ar; } public int getColCount(){ return ar[0].length; } } I can display the array with code in foreach tag referring to the array size: <h:dataTable value="#{mC.ar}" var="dt"> <c:forEach var="fe" begin="0" end="#{mC.colCount-1}"> <h:column> <f:facet name="header">X</f:facet> #