Menu
  • HOME
  • TAGS

SSL Implementation using java keytool

java,tomcat,ssl

1.. Creating keystore keytool -genkey -alias name1 -keyalg RSA -keystore name1.keystore -storepass password -keypass keypassword -storetype JKS -keysize 1024 name1 - alias name (you can give your own alias) name1.keystore - keystore file name to be created (you can specify location like c:\name1.keystore) password - keystore password keypassword - keystore...

How do I publish my own typed WSDL?

java,web-services,tomcat,wsdl,jax-ws

Well, looking at the error messages I figured the problem was with the cxf-servlet.xml file. Initially it was - <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:soap="http://cxf.apache.org/bindings/soap" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/bindings/soap...

Run tomcat application from any subdomain, subfolder or ROOT

java,url,tomcat,path

Maybe my question was unclear, after a lot of searching and trying I got my application to work, no matter in what subfolder it is installed. I did this bij adding request.getContextPath() to the beginning of every url in de jsp (view) page. For example to get the css file:...

how to manage multiple war application in tomcat server?

java,maven,tomcat,servlets

Use same tomcat server, but copy and rename your web application to something different. For eg, original application name app, copy and rename as following. webapp -> app1 app2 app3 Running tomcat server per each war application need to maintain many server. This is a bad idea....

Spring : How to configure tomcat Datasource Programatically in Groovy DAO

java,spring,spring-mvc,tomcat,groovy

Here's the piece of code you can follow (with PostgreSQL, but it should more or less work the same): import org.postgresql.ds.PGPoolingDataSource import org.springframework.beans.factory.annotation.Value import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration import javax.sql.DataSource @Configuration class PostgreSQLDatasourceConfiguration { @Bean(name = 'dataSource') DataSource ds(@Value('${DATABASE_URL}') String databaseFullUrl) { assert databaseFullUrl, 'Database URL is required to...

How are JSP/Servlet's executed in a Java-Capable webserver? [closed]

java,jsp,tomcat,java-ee,servlets

Please refer the spec http://www.oracle.com/technetwork/java/javaee/tech/index-jsp-142185.html To brief you about the invocation when a war is deployed in the web server,the server refers the web.xml files for important configuration and then finds out the information regarding your webapp.All the configuration is loaded.If you try to hit an url mapped to a...

Service not starting using Spring-boot during integration tests

tomcat,spring-boot,rest-assured

For web integration testing, you should use @WebIntegrationTest instead. @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = Application.class) @WebIntegrationTest public class ApplicationTest { @Value("${local.server.port}") private int port; @Before public void setup() { RestAssured.baseURI = "http://localhost:" + port; } @Test public void testStatus() { given().contentType(ContentType.JSON).get("/greeting").prettyPeek().then().statusCode(200); } @Test public void testMessage() {...

Application can't find properties file on Tomcat server

java,tomcat,tomcat8

Accessing the underlying file system is not supported by the servlet specification and is not guaranteed to work, especially if the access happens from an unexploded .war-file (I'm assuming that's what's happening in your case). It makes your app dependent on the underlying system - OS, server etc. The recommended...

How to get some utf-8 characters using hibernate and spring mvc in database?

java,spring,hibernate,spring-mvc,tomcat

first remove this line <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> and this add into header tag <meta http-equiv='Content-Type' content='text/html; charset=UTF-8' /> then add into web.xml <filter> <filter-name>encoding-filter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value>...

Jersey Viewable resulting in 404

java,spring,jsp,tomcat,jersey

For anyone experiencing this issue, here's the solution, courtesy of the link provided by peeskillet here. My issue was that I was missing the following dependency, though mine was a different version: <dependency> <groupId>org.glassfish.jersey.core</groupId> <artifactId>jersey-server</artifactId> <version>2.0-m07-1</version> <type>jar</type> <scope>compile</scope> </dependency> After adding that dependency to my pom everything worked....

Where is root directory in Tomcat web application?

jsp,tomcat,tomcat8

CATALINA_HOME is Tomcat directory. Look at folder %CATALINA_HOME%\work\Catalina\localhost\web_application_name\ or %CATALINA_HOME%\webapps\ROOT

Tomcat v7.0 Server at localhost failed to start (Only with specific WebApp)

java,tomcat,tomcat7

Hello You should check your web.xml file because you have 2 servlets DOMServlet and edu.unsw.comp9321.DOMServlet refering to the same url-pattern, if you are not mapping the servlets in the web.xml check in your code the classes anotated with @WebServlet. other important point is that maybe you have a deployed another...

Deploye two wars with different domain name but same context-path in same jboss-4.0.3

tomcat,jboss,web-deployment,contextpath

I have added another host vhost2 to server.xml inside folder ${jboss-home}server\default\deploy\jbossweb-tomcat55.sar folder as follows: <Server> <Service name="jboss.web" className="org.jboss.web.tomcat.tc5.StandardService"> <Connector port="8080" address="${jboss.bind.address}" maxThreads="250" strategy="ms" maxHttpHeaderSize="8192" emptySessionPath="true" enableLookups="false" redirectPort="443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true"/> <Connector protocol="HTTP/1.1"...

Express.js server with Apache Tomcat

node.js,tomcat,express

I don't believe that combining express.js (simple web server for Node.JS platform) and Apache Tomcat (Servlet container from JVM world) make sense at all. I bet that you are confusing Apache Web Server with Apache Tomcat. They are two completely separate projects. If that is the case than notice that...

Application root path

java,jsp,spring-mvc,tomcat,servlets

Please see the DNS mapping for your production URL and check in server.xml file that to which directory in webapps the DNS is pointing to. on other hand as you ask- you just need to call a servlet from jsp then why you needed to provide the context path, just...

Tomcat filter not being invoked for Atmosphere servlet

java,tomcat,servlets,servlet-filters,atmosphere

So after a lot of digging around I figured out the issue: since the AtmosphereServlet class performs asynchronous I/O it implements the org.apache.catalina.comet.CometProcessor interface, and so Tomcat does not invoke the normal filter chain for it since it is an asynchronous servlet. Instead, my filter had to implement the CometFilter...

Tomcat servlet the requested resource is unavailable

java,tomcat,servlets

Your web.xml file needs to be inside the WEB-INF folder instead of next to it. If it's not in the right location, Tomcat won't parse it and your URL patterns will not be correctly configured. If you're using the Servlet 3.0 (or higher) API, you could also configure your servlet...

Idea 14 - Maven 3 - pass parameters

java,maven,tomcat,intellij-idea

You can define profile specific properties directly in pom.xml like so: <profile> <id>localhost</id> <properties> <augage_env>local</augage_env> </properti‌​es> </profile> More information can be found in Maven documentation for build profiles....

Placing secure data in Java web application

java,security,tomcat

Using a servlet does not make anything secure by itself. You dont need a Java tool to connect, you can even use Telnet, any scripting language or create your own socket. Just use a download servlet from somewhere and at least Basic authentication ("information hiding" is no security aspect ;)....

Set locale for JSTL in Tomcat JVM arguments for testing?

java,tomcat,intellij-idea,jstl

You need to change the client locale, not the server locale. It's the client who's interested in localized web page, not the server. The server has just to respond accordingly on client's request. How to change the client locale depends on the client used. In Chrome for example, you can...

Struts namespaces and WEB-INF folder

java,jsp,tomcat,struts2

I found where I was wrong. As Alexander M pointed out in comments no such url will be generated. The thing is I've tried various bad solutions, but most of them had the next synopsis. In struts.xml I wrote: <package name="product" namespace="/" extends="struts-default"> <action name="view" class="com.example.action.product.ViewProduct"> <result name="success">/WEB-INF/view/product/view.jsp</result> </action> </package>...

Tomcat 7.0 + Chrome dont show JSON

java,json,rest,tomcat,jersey

Seeing from your previous question, you seem to missing a provider for JSON/POJO support. You can see this answer for all the jars and dependencies you need to add to your project. Note: The linked answer shows 2.17 jars for Jersey, but you are using 2.18. The answer also provides...

Wildcard with Service Stop/Start

batch-file,tomcat,kill

You can use WMIC commands with wildcards to accomplish this: wmic service where "name like 'tomcat%'" call stopservice See Wildcard Services restart on the Super User site....

Disable direct access to application via Tomcat

apache,tomcat

You could consider using the proxy_ajp instead of proxy_http. But you can also use the RemoteAddrValve to define restrictions based on IP address: <Engine name="Catalina" defaultHost="localhost"> ... ... ... <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127\.0\.0\.1"/> ... </Engine> ...

Alternative of JTATransaction

spring,tomcat,java-ee,jta

You could try TomEE. It's a Java EE 6 server that meets the Web Profile requirements and is based on Tomcat. So it will support JTA transactions. You can get it from http://tomitribe.com

Log runtime exceptions using log4j in JSF web application

jsf,tomcat,log4j

There's usually no means of an uncaught exception in a Java EE web application as the server ultimately catches any exception coming from the web application and displays it in case of synchronous HTTP requests in a HTTP 500 error page (in case of asynchronous (ajax) requests, this is in...

Cannot find a package in yum repo list

tomcat,centos,yum

Your Yum is configured to search for the default yum repositories and if it can't find the package in that repository, you need to specify the appropriate repository hosting the package. You could specify this using https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sec-Managing_Yum_Repositories.html The below articles might help you install tomcat-native http://linuxfreaks.in/tomcat-native-library-apr-installation-on-centos/...

TomEE starts but Netbeans gives “Failed to start” error

java,tomcat,netbeans,tomee

In server.xml, remove the xpoweredBy and server attributes from the connector: <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" xpoweredBy="false" server="Apache TomEE" /> ...

Is there a way to cluster different machines running Tomcat instances

tomcat,amazon-ec2

Confirmed, @sri asked for load balancer in AWS. Please go through the document aws elb Elastic Load Balancing automatically distributes incoming application traffic across multiple Amazon EC2 instances in the cloud. It enables you to achieve greater levels of fault tolerance in your applications, seamlessly providing the required amount of...

What is difference between Tomcat and TomEE, TomEE and TomEE Plus

tomcat,server,tomee

This is functions comparison matrix between Tomcat, TomEE and TomEE+: (Source: http://tomee.apache.org/comparison.html) 1. Tomcat vs TomEE Tomcat is servlet container, support servlet, JSP technology. TomEE is boarder than Tomcat, support many another Java EE technologies (specificed by JSR-xxx). 2. Compare TomEE vs TomEE+ TomEE contains: CDI - Apache OpenWebBeans EJB...

How to use a local tomcat version with maven

java,maven,tomcat

I found a solution here: https://tomcat.apache.org/maven-plugin-trunk/executable-war-jar.html Ex you set the serverXml to point to your local tomcat installation. <project> ... <packaging>war or pom</packaging> ... <build> ... <plugins> ... <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.3-SNAPSHOT</version> <executions> <execution> <id>tomcat-run</id> <goals>...

CORS Request Error Tomcat 7 & Java Servlet

java,tomcat,servlets

OK, I got it. The problem was a pretty simple one, but it was causing me so much trouble. I'm programming with eclipse and I'm new to this IDE. Eclipse seems to use it's own copy of Tomcat in a binary .metadata-folder in my workspace. If anyone else has this...

How do I password protect an HTTP Get Request on my Apache Tomcat server?

java,apache,http,tomcat,servlets

you need to configure user and role in tomcat's tomcat-users.xml file.. and also configure URL in web.xml file for using this authentication.. giving you sample code below... tomcat-users.xml file: <?xml version='1.0' encoding='utf-8'?> <tomcat-users> <role rolename="tomcat"/> <user username="tomcat" password="tomcat" roles="tomcat"/> <user username="myname" password="mypassword" roles="tomcat"/> <user username="test" password="test"/> </tomcat-users> web.xml file :...

Trying to setup tomcat to use servlets

java,tomcat,servlets,invokerequired

I've just take a quick look up to the book and on page 407, there are the lines that you have to decomment or/else if not exist, add. From the book; <!-- <servlet> <servlet-name>invoker</servlet-name> <servlet-class> org.apache.catalina.servlets.InvokerServlet </servlet-class> <init-param> <param-name>debug</param-name> <param-value>0</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> --> Anything located in between the "<!--"...

Tomcat support for HTTP/2.0?

tomcat,https,tomcat7,tomcat8,http2

I'm the HTTP/2 implementer in Jetty, and I watch out other projects implementing HTTP/2. Tomcat's Mark Thomas has outlined support for HTTP/2 for Tomcat 9. Considering that Servlet 4.0 is going to have as a target HTTP/2 support, and that HTTP/2 support requires ALPN support in the JDK (which also...

Java Restful Service eclipse tomcat HTTP Error 404

java,rest,tomcat,jersey,jersey-2.0

You're using the old (1.x) Jersey configuration. In Jersey 2.x, the class namescpaces and property names have changed. You should instead use <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class> <init-param> <param-name>jersey.config.server.provider.packages</param-name> ... See other deployment options here...

Eclipse & Tomcat - Class loading

java,eclipse,tomcat,tomcat7,eclipse-luna

Apart from the whole eclipse aspect: As you mention tomcat and a server project: You probably have a web application. Web applications, when deployed, include all the jar-files that are contained in WEB-INF/lib at runtime. When everything works at compile time, eclipse is happy with the setup. When you get...

Configure APR connector in Spring Tool Suite/Eclipse

eclipse,tomcat,spring-tool-suite,apr

Got it.. Need to set the envioronment variable of tomcat LD_LIBRARY_PATH - /usr/local/apr/lib See the second answer of this link...

Openshift context path

java,tomcat,openshift,war

You should use your OPENSHIFT_DATA_DIR (~/app-root/data) to store uploaded images. However, using Java this presents some challenges. I would recommend that you read through this article (https://forums.openshift.com/how-to-upload-and-serve-files-using-java-servlets-on-openshift), it should help you with dealing with user uploaded images.

How to use two port numbers for a single java web application?

java,eclipse,tomcat,servlets,port

Find out which tomcat installation eclipse is using. Under your tomcat installation there is a conf/server.xml file. You add a new HTTP connector for the port you desire there and restart tomcat. Now you have tomcat listening to the extra port you added. <Connector port="4121" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8" />...

Remote debugging tomcat with OpenShift

eclipse,tomcat,openshift,remote-debugging

You should read through the Developer Portal's pages on Port Forwarding (https://developers.openshift.com/en/managing-port-forwarding.html) to make sure that you are using it correctly. You will want to connect to your local loopback address: 127.0.0.1 along with the correct forwarded port once you have run the port-forwarding command.

Fowarding from Apache to Tomcat breaks Grails rest api calls

apache,rest,tomcat,grails

Turns out it is not an Apache/Tomcat problem... but something with Grails. I am not what specifically fixed this issue, but it had something to do with the rest controller. I recreated that specific rest controller and it worked.

How to prevent JSF from initializing automatically?

jsf,tomcat,mojarra

It's loaded via a Servlet 3.0 ServletContainerInitializer implementation in the JSF implementation JAR file (in case of Mojarra, it's the com.sun.faces.config.FacesInitializer). It will auto-register the FacesServlet on the URL patterns *.jsf, *.faces and /faces/* (JSF 2.3 will add *.xhtml to the list of URL patterns). Latest JSF 2.1 implementations and...

Using client certificate with Apache Axis 1

web-services,tomcat,axis,client-certificates

The solutions is to use JVM-Paramters for truststore and keystore. java -Djavax.net.ssl.trustStore=/some/path/myTruststore.jks -Djavax.net.ssl.trustStorePassword=abc -Djavax.net.ssl.keyStore=/some/path/myKeystore.p12 -Djavax.net.ssl.keyStorePassword=defg -Djavax.net.ssl.keyStoreType=PKCS12 ...

Get authorisation token after HttpServletRequest.login()

java,tomcat,servlet-3.0,websphere-8

Any reason why you want to store that cookie? As it changes after the certain timeout, so storing it doesn't provide much value. Below code that you can use to access it from request. Authentication token is a cookie not a header. You have to access it using the following...

Intellij web application on tomcat server shows http://localhost:8080/index.jsp instead of http://localhost:8080/myapp/index.jsp

java,jsp,tomcat,servlets,intellij-idea

You can enter your application URL in the 'Edit Connfiguration' of your tomcat server. Click on Edit Configuration Enter you application URL in the start up page Note:- Most probably above solution will work, if it doesn't then you might need to change the application context to '\myApp' in deployment...

Use JSF, JPA, JTA, JAAS, CDI, Bean Validation with Tomcat? [closed]

jsf,tomcat,jpa,cdi,jta

Yes. Except of JAAS. ​​​​​​​​...

Meaning of connectionTimeout in tomcat

java,eclipse,tomcat

Taken from here: https://tomcat.apache.org/tomcat-7.0-doc/config/http.html connectionTimeout The number of milliseconds this Connector will wait, after accepting a connection, for the request URI line to be presented. Use a value of -1 to indicate no (i.e. infinite) timeout. The default value is 60000 (i.e. 60 seconds) but note that the standard server.xml...

Tomcat server is getting started but displaying only blank page when I open it

java,tomcat,servlets

Several check have to be done: ${TOMCAT_HOME}/webapps/ROOT is not empty ${TOMCAT_HOME}/logs/ must be checked. If any error is present, it has to be corrected. Check the content of the blank page. If there is any code then it is probably coming from a bug in the building process of your...

Tomcat, enable DELETE method

tomcat,tomcat7,http-delete

Have a look at the source code: Default Servlet There you can see that a status code 405 Not allowed is returned if the delete call of the web resource failed. From your question it's not clear what you are trying to delete - it seems that your resource can't...

solrException. XML parser doesn't support XInclude option

xml,tomcat,solr,lucene,xinclude

This can be triggered by other configuration options than solr.xml and solrconfig.xml - the exact error message seems to be produced by the Currency field, which require XInclude to load its list of currencies. While I'm not sure about the exact reason for this, my guess is that Tomcat bundles...

Spring Boot War file gets 404 on ec2

tomcat,amazon-ec2,spring-boot,.war

I've answered a similar question here. You are running your external tomcat under a Java 1.7 JRE, while having compiled your code against 1.8. Strangely, there is no error, and the app appears in the manager app, but then you get a 404 when you're trying to access it. One...

how can i find which application is causing memory leaks

java,tomcat,memory-leaks,heap

You may use the combination of jmap/jhat tools (Both these are unsupported as of Java 8) to gather the heap dump (using mmap) and identify the top objects in heap (using jhat). Try to co-relate these objects with the application and identify the rogue one.

AOP (without Spring) not working on Tomcat but Eclipse

java,tomcat,aop,aspectj

Found solution to this using maven. One needs to add aspectj-maven-plugin in pom.xml. < plugin > < groupId > org.codehaus.mojo < /groupId> <artifactId>aspectj-maven-plugin</artifactId > < version > 1.4 < /version> <configuration> <source>1.7</source > <target > 1.7 < /target> </configuration > <executions > <execution > <goals> <goal>compile</goal > < /goals> </execution...

Tomcat - redirect old context root to new context root

java,tomcat,servlets,contextroot

There is a Dir called ROOT under tomcat/webapps. This ROOT "app" ends up getting invoked for those URLs that have "contextPath" different from the Directories under Webapps folder. So you could: Create folder called "oldappname" directly under the "ROOT" folder. Create an index.html in that "oldappname" folder, and make it...

Spring Boot: Inject a custom context path

spring,spring-mvc,tomcat,spring-security,spring-boot

Got it working! Spring Security docs ( http://docs.spring.io/spring-security/site/docs/3.1.x/reference/security-filter-chain.html ) say: "Spring Security is only interested in securing paths within the application, so the contextPath is ignored. Unfortunately, the servlet spec does not define exactly what the values of servletPath and pathInfo will contain for a particular request URI. [...] The...

error has occured when running

spring,spring-mvc,tomcat

This seems to be generic issue that occurs due to missing library (apache commons in your case) in the class path. If you are using maven to build the war include the below dependency <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.2</version> </dependency> You might need to select the appropriate version as per your...

OutOfMemoryError on tomcat7

java,jsp,tomcat,memory

The issue is not in the unzip code you had posted. the root couse is in: java.lang.OutOfMemoryError: Java heap space org.apache.commons.io.output.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:322) org.apache.commons.io.output.DeferredFileOutputStream.getData(DeferredFileOutputStream.java:213) org.apache.commons.fileupload.disk.DiskFileItem.getSize(DiskFileItem.java:289) Do you notice the ByteArrayOutputStream.toByteArray ? So it seems that you are writing to a ByteArrayOutputStream which grows too much. Please locate and post...

Multitenented Parallel Processing

java,multithreading,tomcat,parallel-processing,threadpool

Threadpooling is a tempting solution, but as you suspect its scalability can be limited in a real multi-user scenario. In reality you're going to be limited by the number of cpus anyway and most of the time you're going to have more users than cpus so my experience is that...

How to deploy a spring boot MVC application in traditional tomcat webapps folder?

java,spring-mvc,tomcat,spring-boot

meskobalazs answered your question about the resources when building a war deployment (but notice that src/main/webapp is not read as a resource folder in a jar deployment, you have to add it as a resource in this case). When you want to change your Spring-Boot app to a web deployment...

access tomcat deployed application (aws) by domain name (www.mydomain.com)

tomcat,amazon-ec2,dns,ip

I solved my problem with the help of above answer provide by noname and some google help. As I have unzipped tomcat so, did some env setup as followed- in server.xml changed port 8080 to 80 sudo apt-get authbind. touch /etc/authbind/byport/80. chmod 500 /etc/authbind/byport/80. created setenv.sh in /usr/local/tomcat/bin folder. did...

Tomcat SSL Cert Renewal Issue (SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure)

java,apache,tomcat,ssl,https

Oh my god I feel a fool, I thought when creating the keystore when it asks for a password for tomcat it wanted my tomcat manager password, nope just keep it the same as your keystore. Also, gdroot-g2.crt is the correct crt needed for the root alias, you can get...

Linkage Error in Tomcat when 2 webapp instances load lucene classes

java,tomcat,lucene,jvm,java.lang.linkageerror

After doing some more debug in the light of day I decided to update the jdk just to be 100% sure to openjdk 1.7u79 (from 1.7_05). This seems to have resolved the issue. Lucene says to use at least update 55 since there are some JVM bugs below that (I...

Spring boot war file deploy on Tomcat

tomcat,deployment,spring-boot,war

Just tried this here, and could reproduce the exact same behaviour. As silly as it sounds, most likely you are running your external tomcat under a Java 1.7 JRE (speculation), while having compiled your code against 1.8 (we know this from your pom). Strangely, there is no error, and the...

How to pass deployment dependant parameters to webapp

java,tomcat,servlets,parameter-passing,servlet-container

You can use a multitude of things based on your environment. Here are somethings which may be considered Use datasources The datasources defined in the server context removes the hard wired dependency of managing db configurations and connection pool from the web application. In Tomcat, this can be done as...

Axis2 keeps generating files in temp folder when running on tomcat

java,tomcat,soap,axis2,axis

This turned out to be caused by a class being constantly re-created which is initializing a new Context on each service call. In a nutshell: The Axis2 (temp files) issue does not reproduce on Axis2 1.5.4. Temp fles are generated only on the creation of a new Axis2 Context. Temp...

CAS Redirect Loop

java,tomcat,single-sign-on,cas

It was nothing to do with my configuration. I watched several videos and understood that my configuration do not have any problems. The problem is with the 4.0.0 release. I do not know if any one else faced the same problem. My Solution: I took latest source (4.0.2) and built...

How can i address this---> Error HTTP Status 404 on my Code below

java,html,xml,tomcat

Try this: index.html file <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> </head> <body> <form method="post" action="LearningServlet"> What is your age?<input name = "age"><br> What is your Gender?<input name ="gender"><br> Where did you go to school?<input name = "schoolname"><br> Where do you Work?<input name = "work"><br> Where do you...

How to make a redirect in velocity template?

apache,tomcat,velocity

IMHO a template is the wrong place to implement logic like this. You should determine upfront (in whatever you do - you don't mention your environment other than velocity), before you determine that the velocity template in question should render the output. Once you're in the template, you can't assume...

Docker image builds, but doesn't run

java,tomcat,docker,tomcat6,libreplan

If I run your image: $ docker run --name libreplan aquavitae/libreplan I get: May 28, 2015 4:57:42 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib May 28, 2015 4:57:42 PM org.apache.coyote.http11.Http11Protocol init INFO:...

Netbeans project deployment failure

java,tomcat,netbeans,localhost

I have noticed that, I was able to run same project few days back, but not at my workplace. Here, I'm using proxy to access internet. Also, noticed that, it is trying to deploy my project on my LAN ip address. So, I removed my LAN cable and remove proxy...

Get the currently used protocol name from HttpServletRequest?

java,spring,tomcat

The protocol is HTTP/1.1, since it is a specific version of HTTP. The scheme as given by ServletRequest#getSchemeitself is http: new URL(httpRequest.getScheme(), httpRequest.getServerName(), httpRequest.getServerPort(), httpRequest.getContextPath().concat("/foo/bar.html")); ...

Unable to load bean using Struts convention plugin

java,maven,tomcat,struts2,struts2-convention-plugin

If you look into maven dependencies the struts2-core already has a dependency on xwork-core, so it should be downloaded when you build the app. Diffrent versions of plug-ins could make the plugin stop working or it just breaks on startup. You should use the following artifacts <dependency> <groupId>org.apache.struts</groupId> <artifactId>struts2-core</artifactId> <version>2.3.24</version>...

Spring Boot configure a Domain/Host to access in a www.website.com fashion

tomcat,nginx

Technically you could do that in Tomcat. However, to start the application with port 80 or 443 you would have to run it with root permissions. Thus i'd recommend to configure and Apache HTTP or an Nginx server as reverse proxy (you can find many tutorials for that topic).

How to configure Servlet on Tomcat Server and fix javax.naming.NameNotFoundException?

java,tomcat,servlets,web.xml,catalina

It's not working because the app can't find the Servlet. Wrong. javax.naming.NameNotFoundException: Name [controller.ControllerServlet/categoryFacade] is not bound in this Context. Unable to find [controller.ControllerServlet]. It can't find the name controller.ControllerServlet in the naming resources Somewhere you are using java:comp/.../controller.ControllerServlet/categoryFacade. I suggest you look into where you are using categoryFacade...

Tomcat failing to startup

java,tomcat,java-8,java-7

This is an error caused by an invalid JVM command-line parameter. Here's one way to reproduce it: C:\>java -agentpath:D:\Program Files\blahblah Error occurred during initialization of VM Could not find agent library D:\Program in absolute path, with error: Can't find dependent libraries Check Tomcat's Java options. Run %CATALINA_HOME%\bin\tomcat8w.exe as administrator, navigate...

user.dir is incorrect while using tomcat web app in eclipse

java,eclipse,tomcat,path,relative-path

At runtime, e.g. when you're not running from inside eclipse, you probably want to work in a defined directory as well - I'd suggest to explicitly configure a specific directory. When you're running within an appserver, you might run as an unpriviledged user that doesn't have a home directory writeable...

Tomcat 7 not started in jax-ws

java,eclipse,apache,tomcat

the below part of error suggests that you are using unsupported version of Jersey. Please check and use an appropriate version. Caused by: java.lang.UnsupportedClassVersionError: org/glassfish/jersey/servlet/init/JerseyServletContainerInitializer : Unsupported major.minor version 51.0 (unable to load class Version 51.0 corresponds to Java 7. Are you starting tomcat with a version below Java 7?...

Whenever I try to run Tomcat with Jersey, it refuses to load

java,rest,tomcat,jersey

The unsupported class version error suggests that you are using a newer version of jersey than is supported by your tomcat installation. Most likely it is because of jre version mismatch - the jersey library you are using requires a newer jre but you have an older version

How to shutdown a Tomcat's instance that wont shutdown? [duplicate]

java,tomcat,netbeans,tomee

The problem is the same as Mugi4ok. So it is a possible duplicate. The full answer was found here...

Insufficient memory for Java Runtime Environment to continue in Tomcat

java,tomcat,jvm,jvm-crash

What is the min and max heap size for the JVM? The out of memory error occurred due to low memory for JVM heap. What is the OS having Tomcat? Is it a 32-bit OS? Also, what is the RAM memory on the system? 32-bit OS with let's say 4GB...

Tomcat not deploying new version of files at all - linux / eclipse

linux,eclipse,tomcat

The Server Path is the same as the Tomcat installation directory in the modal you see in Window > Preferences > Server > Runtime Environments after hitting Edit. That should be set to /opt/tomcat7 or wherever the root of your Tomcat installation lives. The Deploy Path is relative to the...

Tomcat 7 PermGen Space or Failed to Create JVM

java,eclipse,tomcat,tomcat7,permgen

Problem solved : Downloaded a new Tomcat (7.0.62) : https://tomcat.apache.org/download-70.cgi Added Arguments at the launch of my Tomcat : -Xms256m -Xmx512m -XX:MaxPermSize=128m ...

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver [Eclipse, Tomcat]

java,mysql,eclipse,tomcat,jdbc

It should be in your Webcontent/WEB-INF/lib folder not Webcontent/META-INF/lib

How to Setup a Docker Tomcat Container on Mac OS X

osx,tomcat,docker

Information: Because Docker only runs on Linux you will need to install some kind of virtual instance on your local machine. An easy and popular way to do that is to install Boot2docker and VirtualBox. VirtualBox is a dependency of Boot2docker. You can download, setup and install the latest versions...

Spring and Tomcat: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set

java,mysql,spring,hibernate,tomcat

I was able to resolve this issue by working through the steps listed in @Soheil 's answer found here: Solving a "communications link failure" with JDBC and MySQL It turns out that all I needed was add the hibernate dialect, as @Dhanush Gopinath suggested, and add the following to my...

Included CDI-enabled Servlet Fails with ContextNotActiveException: WELD-001303:

java,tomcat,servlets,cdi,weld

WOW! with the help of a good friend, I got it! To make this work, you need to configure a special Weld cross-context filter. You configure the filter by adding the following lines to the web.xml file. <filter> <filter-name>WeldCrossContextFilter</filter-name> <filter-class>org.jboss.weld.servlet.WeldCrossContextFilter</filter-class> </filter> <filter-mapping> <filter-name>WeldCrossContextFilter</filter-name> <url-pattern>/*</url-pattern>...

java.io.IOException: Permission denied while creating new file from Tomcat in Grails

tomcat,grails

Shouldn't the code be like def path = "/var/csvs/" + file.fileItem.fileName // notice the trailing fwd slash otherwise it is very likely you're trying to write into the /var directory....

Cannot start a war with a tomcat

tomcat,war

The HTML files you mentioned are not packaged in the war file(You can open it with 7zip/winrar or something like that to see for yourself). When building the application into the war file make sure your HTML files are packaged, they should be located in the root map alongside the...

how to uninstall tomcat from AWS linux?

linux,tomcat,amazon-web-services

sudo yum remove tomcat7 tomcat7-webapps.

Editing Folder content in tomcat manually?

java,html,apache,tomcat,war

You can, and It will work. You can even change the JSP code. The only issue you may have is that when you redeploy a new version of the war, changes made in the server will ve overriden by the new version, so you better change it in the original...

Why do some servers run both Tomcat and also Apache Web Server?

java,apache,web-services,tomcat

Tomcat is a fine Servlet container, but there are a lot of things an Apache httpd can do better (easier and/or faster). For example Apache can handle security, SSL, provide load balancing, URL rewriting etc. You can also split content: you can have your Apache httpd to serve static content...