Alfred’s Computing Weblog

Alfred Java-cored Computing Weblog

Posts Tagged ‘maven

The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved

with 3 comments

Error:
Hit this error while deploying webapps in Tomcat. “The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved …”

Story:
I’m trying to include JSTL in JSP pages. I get the above error while starting up the webapp in Tomcat.

Solution:
The jstl.jar is missing from the web deployment package (.war) file. Add in jstl.jar in /WEB-INF/lib/ is the most directive way to solve this problem. If maven is used in the project, we can include the xml code below and let maven do the JAR file searching and packing for us.

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>jstl</artifactId>
    <version>1.1.2</version>
</dependency>

Thanks for godbiest’s update 🙂

Written by Alfred

December 22, 2008 at 17:04

Posted in Java, maven

Tagged with ,

Maven + Jetty = Quick Deploy in Developement

leave a comment »

In web application development, that is very common cycle for developer to making code chances, re-deploy application, and test again. The re-deploy process is a huge time-wasting process.

To solve it, I use Jetty (a lightweight servlet container) with Maven to re-compile and re-deploy the web application on the fly! It saves my time 😀

<plugin>
	<groupId>org.mortbay.jetty</groupId>
	<artifactId>maven-jetty-plugin</artifactId>
	<configuration>
	<scanIntervalSeconds>10</scanIntervalSeconds>
	<connectors>
		<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
			<port>8080</port>
			<maxIdleTime>60000</maxIdleTime>
		</connector>
	</connectors>
	<webApp>${basedir}/target/my-web-app-0.1-SNAPSHOT</webApp>
	<requestLog implementation="org.mortbay.jetty.NCSARequestLog">
	<filename>target/yyyy_mm_dd.request.log</filename>
	<retainDays>90</retainDays>
	<append>true</append>
	<extended>false</extended>
	<logTimeZone>GMT</logTimeZone>
	</requestLog>
	</configuration>
</plugin>

To execute Jetty in Maven:
cd to your application path, $> mvn jetty:run

Written by Alfred

December 19, 2008 at 19:14

Posted in tomcat

Tagged with ,