在Glassfish 3.1中使用taglibs时发生异常 [英] Exception when using taglibs in Glassfish 3.1

查看:54
本文介绍了在Glassfish 3.1中使用taglibs时发生异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试在Glasfish 3.1中部署我的应用程序时出现以下错误

I'm getting the following error while trying to deploy my app in Glasfish 3.1

org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP

PWC6197: An error occurred at line: 16 in the jsp file: /WEB-INF/jsp/signup/signup.jsp
PWC6199: Generated servlet error:
string:///signup_jsp.java:233: package org.springframework.web.servlet.tags.form does not exist

spring jars在我的Web应用程序的lib目录中.

The spring jars are in the lib directory of my webapplication.

我正在使用: 春季3.1.3 Glassfish 3.1.1(使用Maven嵌入式插件开始)

I'm using: Spring 3.1.3 Glassfish 3.1.1 (started using the Maven embedded pluging)

有什么想法吗?

推荐答案

我偶然发现了答案基本上,您需要在glassfish-web.xml中使用它:

Basically you need this in glassfish-web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
  <class-loader delegate="true"/>
  <jsp-config>
    <property name="keepgenerated" value="true">
      <description>Keep a copy of the generated servlet class' java code.</description>
    </property>
    <property name="compilerSourceVM" value="7"/>
    <property name="compilerTargetVM" value="7"/>
  </jsp-config>
</glassfish-web-app>

这篇关于在Glassfish 3.1中使用taglibs时发生异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆