标签归档:java

resin-pro-4.0.34 crack 破解文件下载

resin-pro-4.0.34 破解文件下载pro.jar

resin pro 4.0.34 Full Cracked download.

下载压缩包,解压出来pro.jar文件,停掉resin,覆盖原来lib目录的pro.jar文件重启resin即可成为professional版本。

仅供学习使用,请在下载后24时间内删除。

破解方法来自
http://www.strongd.net/?p=1163

Groovlets (groovy servlet) 的 helloword

需要
Groovy Version: 1.5.0
resin pro 3.1.4
groovy的安装,略

启动resin后,会有一个%RESIN_HOME%\webapps\ROOT\WEB-INF\web.xml文件。
增加如下内容

<servlet>
      <servlet-name>GroovyServlet</servlet-name>
      <servlet-class>groovy.servlet.GroovyServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>GroovyTemplate</servlet-name>
        <servlet-class>groovy.servlet.TemplateServlet</servlet-class>    
	</servlet>
    <servlet-mapping>
        <servlet-name>GroovyServlet</servlet-name>
        <url-pattern>*.groovy</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>GroovyTemplate</servlet-name>
        <url-pattern>*.gsp</url-pattern>
    </servlet-mapping>

copy %GROOVY_HOME%\lib\下的
groovy-1.5.0.jar
asm-2.2.jar
antlr-2.7.6.jar

%RESIN_HOME%\lib
启动resin,在
%RESIN_HOME%\webapps\ROOT下新建2个文件
hello.gsp
————-
<% def h="hello" def w="world" println "$h $w" print 2+2 println " times" %>

hello.groovy
——-
println “””


Groovy Servlet


Hello world @ ${new Date()}


“””

运行后
http://localhost:8080/1.gsp
http://localhost:8080/a.groovy
的内容分别为
hello world 4 times
Hello world @ Thu Dec 13 23:04:18 CST 2007

JSON-LIB依赖库

只下载json-lib的jar还不行,JSON-LIB的依赖库如下

EZMorph
下载地址http://ezmorph.sourceforge.net
Commons
Collections http://jakarta.apache.org/commons/collections/
Commons Lang
http://jakarta.apache.org/commons/lang/
Commons BeanUtils
http://commons.apache.org/beanutils/
The Logging Component
http://commons.apache.org/logging/

eclise 导出的libraries如下

<?xml version="1.0" encoding="UTF-8"?>
<eclipse-userlibraries version="2">
    <library name="mylib" systemlibrary="false">
        <archive path="D:/jdk/mylib/commons-lang-2.3.jar"/>
        <archive path="D:/jdk/mylib/ezmorph-1.0.4.zip"/>
        <archive path="D:/jdk/mylib/json-lib-2.1-jdk13.jar"/>
        <archive path="D:/jdk/mylib/commons-logging-1.1.jar"/>
        <archive path="D:/jdk/mylib/commons-beanutils.jar"/>
        <archive path="D:/jdk/mylib/commons-collections-3.2.jar"/>
    </library>
</eclipse-userlibraries>

java jsp的request服务器环境变量

<%
out.println("Protocol: " + request.getProtocol() + "<br>");
out.println("Scheme: " + request.getScheme() + "<br>");
out.println("Server Name: " + request.getServerName() + "<br>" );
out.println("Server Port: " + request.getServerPort() + "<br>");
out.println("Protocol: " + request.getProtocol() + "<br>");
out.println("Server Info: " + getServletConfig().getServletContext().getServerInfo() + "<br>");
out.println("Remote Addr: " + request.getRemoteAddr() + "<br>");
out.println("Remote Host: " + request.getRemoteHost() + "<br>");
out.println("Character Encoding: " + request.getCharacterEncoding() + "<br>");
out.println("Content Length: " + request.getContentLength() + "<br>");
out.println("Content Type: "+ request.getContentType() + "<br>");
out.println("Auth Type: " + request.getAuthType() + "<br>");
out.println("HTTP Method: " + request.getMethod() + "<br>");
out.println("Path Info: " + request.getPathInfo() + "<br>");
out.println("Path Trans: " + request.getPathTranslated() + "<br>");
out.println("Query String: " + request.getQueryString() + "<br>");
out.println("Remote User: " + request.getRemoteUser() + "<br>");
out.println("Session Id: " + request.getRequestedSessionId() + "<br>");
out.println("Request URI: " + request.getRequestURI() + "<br>");
out.println("Servlet Path: " + request.getServletPath() + "<br>");
out.println("Accept: " + request.getHeader("Accept") + "<br>");
out.println("Host: " + request.getHeader("Host") + "<br>"); 
out.println("Referer : " + request.getHeader("Referer") + "<br>"); 
out.println("Accept-Language : " + request.getHeader("Accept-Language") + "<br>"); 
out.println("Accept-Encoding : " + request.getHeader("Accept-Encoding") + "<br>"); 
out.println("User-Agent : " + request.getHeader("User-Agent") + "<br>"); 
out.println("Connection : " + request.getHeader("Connection") + "<br>"); 
out.println("Cookie : " + request.getHeader("Cookie") + "<br>"); 
out.println("Created : " + session.getCreationTime() + "<br>"); 
out.println("LastAccessed : " + session.getLastAccessedTime() + "<br>"); 


%>

结果
Protocol: HTTP/1.1
Scheme: http
Server Name: 172.16.96.251
Server Port: 80
Protocol: HTTP/1.1
Server Info: Resin/2.1.10
Remote Addr: 172.16.95.69
Remote Host: 172.16.95.69
Character Encoding: null
Content Length: -1
Content Type: null
Auth Type: Basic
HTTP Method: GET
Path Info: null
Path Trans: null
Query String: null
Remote User: null
Session Id: aGKD_NgqBC3d
Request URI: /tmp/123.jsp
Servlet Path: /tmp/123.jsp
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Host: 172.16.96.251
Referer : null
Accept-Language : zh-cn
Accept-Encoding : gzip, deflate
User-Agent : Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
Connection : Keep-Alive
Cookie : JSESSIONID=aGKD_NgqBC3d
Created : 1193732589340
LastAccessed : 1193735011785