JSP to ASP conversion

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ozzii
    New Member
    • Jan 2007
    • 37

    JSP to ASP conversion

    does any body know how to implement the following code in ASP?

    Code:
    <html>
    <body>
    <%@page import="java.net.URLEncoder"%>
    <%
    String format = java.net.URLEncoder.encode("png:w200,h200,b32,#ffffff");
    String mol = java.net.URLEncoder.encode("CN1C=NC2=C1C(=O)N(C)C(=O)N2C");
    %>
    <img src="http://localhost:8080/examples/jsp/marvin/generate_image.jsp?mol=<%=mol%>&format=<%=format%>"
    width=200 height=200>
    </body>
    </html>
    More importantly how do you implement java classes in a asp page?
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    Originally posted by ozzii
    does any body know how to implement the following code in ASP?

    Code:
    <html>
    <body>
    <%@page import="java.net.URLEncoder"%>
    <%
    String format = java.net.URLEncoder.encode("png:w200,h200,b32,#ffffff");
    String mol = java.net.URLEncoder.encode("CN1C=NC2=C1C(=O)N(C)C(=O)N2C");
    %>
    <img src="http://localhost:8080/examples/jsp/marvin/generate_image.jsp?mol=<%=mol%>&format=<%=format%>"
    width=200 height=200>
    </body>
    </html>
    No need to import, URLEncode is built-in in VBScript:
    myVar = server.urlencod e(stringToEncod e)

    Originally posted by ozzii
    More importantly how do you implement java classes in a asp page?
    I'm not sure what you mean. example?

    Comment

    Working...