本文将带您了解关于GlassFishv3上的jspx脚本元素的新内容,同时我们还将为您解释jsp三种脚本元素的相关知识,另外,我们还将为您提供关于Ant脚本管理Glassfish、Centos6.7下
本文将带您了解关于GlassFish v3上的jspx脚本元素的新内容,同时我们还将为您解释jsp三种脚本元素的相关知识,另外,我们还将为您提供关于Ant 脚本管理 Glassfish、Centos 6.7下glassfish4的JPA特别慢、centos – GlassFish v3有RPM吗?、Enable BlazeDS 4 on Glassfish V3.1.1的实用信息。
本文目录一览:- GlassFish v3上的jspx脚本元素(jsp三种脚本元素)
- Ant 脚本管理 Glassfish
- Centos 6.7下glassfish4的JPA特别慢
- centos – GlassFish v3有RPM吗?
- Enable BlazeDS 4 on Glassfish V3.1.1
GlassFish v3上的jspx脚本元素(jsp三种脚本元素)
.war由GlassFish v3提供。我正在尝试从我的jspx中添加一个javascript文件。
<script type="text/javascript" src="/base/interface/Service.js"></script>
我在http响应中得到以下内容
<script src="/base/interface/Service.js" type="text/javascript" />
问题在于它应该包含</script>
标签。我相信这就是为什么它可以在Chrome上运行,但不能在Firefox或IE上运行的原因。任何想法如何强迫<script></script>
更新:不知道这是否相关,但这是我的jspx文件的开头
<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" xmlns:form="http://www.springframework.org/tags/form" xmlns:spring="http://www.springframework.org/tags" xmlns="http://www.w3.org/1999/xhtml"> <jsp:output doctype-root-element="html" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/> <jsp:directive.page contentType="text/html" pageEncoding="UTF-8"/> ...
答案1
小编典典我使用了<script ...><jsp:text></jsp:text></script>
,并且保留了结束标签。我认为这很丑陋,因此,如果有人有更好的答案,我肯定会感兴趣。
Ant 脚本管理 Glassfish
环境 Glassfish2.x ,windows 7 或者 windows server 2008
该脚本能够部署,关闭和启动 glassfish 服务。
注意的是,启动时 glassfish2 有一个 bug,必须设置系统环境变量 OLD_LAUNCHER 为 true (如果本来没有就添加一个)
官方文档参考:
http://docs.oracle.com/cd/E19316-01/820-4336/6nfqd2b2e/index.html
下面贴脚本了,
<project name="MyDeploy" default="dist" basedir=".">
<description>
Deploying web application on GlassFish2.x
</description>
<!-- set global properties for this build -->
<property name="glassfish.host" value="127.0.0.1" />
<property name="glassfish.user" value="admin" />
<property name="glassfish.passwordfile" location="pwd" />
<!-- password file is a text file with line: AS_ADMIN_PASSWORD=[i]your_glassfish_admin_password[/i] -->
<property name="glassfish.deployer.dir" value="c:/portal/glassfish" /> <!--here use your directory -->
<property name="warfile" value="d:/your.war"/>
<property name="webapp.name" value="yourweb"/>
<property name="webapp.context" value="yourweb"/>
<path id="glassfish.deployer">
<fileset dir="${glassfish.deployer.dir}\lib" >
<include name="*.jar"/>
</fileset>
</path>
<target name="deploy" description="generate the distribution" >
<!-- Create the distribution directory -->
<mkdir dir="${dist}/lib"/>
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}"/>
</target>
<taskdef
name="sun-appserv-deploy"
classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.DeployTask"
classpathref="glassfish.deployer" />
<taskdef
name="sun-appserv-undeploy"
classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.UndeployTask"
classpathref="glassfish.deployer" />
<taskdef
name="sun-appserv-admin"
classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.AdminTask"
classpathref="glassfish.deployer" />
<target name="glassfish-stop">
<echo level="info"> Begin to stop glassfish server now! </echo>
<sun-appserv-admin asinstalldir="${glassfish.deployer.dir}" explicitcommand="stop-domain domain1">
<server
host="${glassfish.host}"
user="${glassfish.user}"
passwordfile="${glassfish.passwordfile}" />
</sun-appserv-admin>
<echo level="info"> done! </echo>
<tstamp>
<format property="end_time" pattern="yyyy-MM-dd HH:mm:ss.SSS" locale="pl"/>
</tstamp>
<echo level="info">Glassfish stopped at ${end_time}</echo>
</target>
<target name="glassfish-start">
<echo level="info"> Begin to start glassfish server now! </echo>
<sun-appserv-admin asinstalldir="${glassfish.deployer.dir}" explicitcommand="start-domain domain1">
<server
host="${glassfish.host}"
user="${glassfish.user}"
passwordfile="${glassfish.passwordfile}" />
</sun-appserv-admin>
<echo level="info"> done! </echo>
<tstamp>
<format property="end_time" pattern="yyyy-MM-dd HH:mm:ss.SSS" locale="pl"/>
</tstamp>
<echo level="info">Glassfish started at ${end_time}</echo>
</target>
<target name="glassfish-deploy" >
<echo level="info">Deploing WAR file on the glassfish remote server ... </echo>
<sun-appserv-deploy
file="${warfile}"
name="${webapp.name}"
contextroot="${webapp.context}"
upload="false"
force="true"
verify="false"
precompilejsp="false"
asinstalldir="${glassfish.deployer.dir}" >
<server
host="${glassfish.host}"
user="${glassfish.user}"
passwordfile="${glassfish.passwordfile}" />
</sun-appserv-deploy>
<echo level="info"> done! </echo>
<tstamp>
<format property="end_time" pattern="yyyy-MM-dd HH:mm:ss.SSS" locale="pl"/>
</tstamp>
<echo level="info">WAR file deployed at ${end_time}</echo>
</target>
<target name="glassfish-undeploy" >
<sun-appserv-undeploy
name="${webapp.name}"
asinstalldir="${glassfish.deployer.dir}">
<server
host="${glassfish.host}"
user="${glassfish.user}"
passwordfile="${glassfish.passwordfile}" />
</sun-appserv-undeploy>
</target>
</project>
原文链接: http://blog.csdn.net/sheismylife/article/details/7310013
Centos 6.7下glassfish4的JPA特别慢
建了vmware虚拟机,Centos 6.7,基本服务器安装,openjdk1.7,glassfish4.1.1(4.0也试过,一样),不涉及 JPA的页面很快,管理页面速度也正常,但是涉及到JPA(使用glassfish自带的eclipselink,原程mysql数据库)的页面特别慢, 需要几分钟才能显示出来。win平台,安装版正常,免安装的解压版一样的现象。
不知这是怎么回事?
centos – GlassFish v3有RPM吗?
在一个相关的说明:为什么GlassFish v3显然缺少RPM包?人们不能使用包装系统安装它吗?
我找到了一个,但它无论如何都不尊重标准包装指南.它更像是放在RPM中的标准安装……
所以这里是:
http://blog.screv.com/?p=143
Enable BlazeDS 4 on Glassfish V3.1.1
But for Glassfish V3,I cannot find any guide,and authentication Failed for Glassfish V3.1.1. And then I downloaded the source code of Glassfish V3.1.1 and BlazeDS 4,after 1 day's debugging. I got the solution hacking TomcatValve again. If you don't want to kNow the detail,just download the jar file or java file. For java file you have to compile that by yourself in BlazeDS 4 open source project. And for jar file,put them into the following directory:
$glassfish_home/glassfish/lib/
If you want to kNow all the detail about this issue,you can read the article below.
What caused BlazeDS's TomcatValve Failed to authenticate?
No method found for Realm.authenticate(String username,String password).
Why BlazeDS's TomcatValve doesn't work for Glassfish V3.1.1 Server?
Glassfish changed it's method signature to Realm.authenticate(String username,char[] password).
How to hack?
Simple replace the method invocation with the following code segment:
More details.
Glassfish(Tomcat) Server will configure Web Module via following class and method:
关于GlassFish v3上的jspx脚本元素和jsp三种脚本元素的介绍现已完结,谢谢您的耐心阅读,如果想了解更多关于Ant 脚本管理 Glassfish、Centos 6.7下glassfish4的JPA特别慢、centos – GlassFish v3有RPM吗?、Enable BlazeDS 4 on Glassfish V3.1.1的相关知识,请在本站寻找。
本文标签: