J
jsp beginner
Hi guys
I am a beginner on JSP. I have a script to decode a string but it
generates an error.
This is what I did.
1. Download "commons-codec-1.3" from the Jakara web site. -
http://jakarta.apache.org/commons/codec/
2. And put it onto this directory - C:\Tomcat4\commons-codec-1.3
3. Set up the jar file in classpath like -
C:\Tomcat4\commons-codec-1.3\commons-codec-1.3.jar;
4. Rebooth my machine.
5. Run my jsp script below.
6. Apache error.
* My tomcat set up is working fine. All my jsp files work fine but I
guess I am doing wrong with this following script and the set-up with
the CODEC.
Please help me what I am doing wrong. Do I add "import" in the first
tag next contentType property? If so, what should it be?
<%@ page contentType="text/html;" import="what?" %>
This is the jsp file.
<base64.jsp>
<%@ page contentType="text/html;" %>
<%
String hi = "hello";
byte[] encodedBytes = Base64.encodeBase64(hi.getBytes());
String decodedString = new String(Base64.decodeBase64(encodedBytes));
%>
show me <%=decodeString%>
I am a beginner on JSP. I have a script to decode a string but it
generates an error.
This is what I did.
1. Download "commons-codec-1.3" from the Jakara web site. -
http://jakarta.apache.org/commons/codec/
2. And put it onto this directory - C:\Tomcat4\commons-codec-1.3
3. Set up the jar file in classpath like -
C:\Tomcat4\commons-codec-1.3\commons-codec-1.3.jar;
4. Rebooth my machine.
5. Run my jsp script below.
6. Apache error.
* My tomcat set up is working fine. All my jsp files work fine but I
guess I am doing wrong with this following script and the set-up with
the CODEC.
Please help me what I am doing wrong. Do I add "import" in the first
tag next contentType property? If so, what should it be?
<%@ page contentType="text/html;" import="what?" %>
This is the jsp file.
<base64.jsp>
<%@ page contentType="text/html;" %>
<%
String hi = "hello";
byte[] encodedBytes = Base64.encodeBase64(hi.getBytes());
String decodedString = new String(Base64.decodeBase64(encodedBytes));
%>
show me <%=decodeString%>