bibek, agarwal

Greenhorn
+ Follow
since Dec 05, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by bibek, agarwal

in order to work with weblogic after the 30 days evaluation period you need to do the following.
go to the my domain folder and copy the Config.xml file and keep it in some directory.
Once you have done that you can again install the weblogic server without uninstalling the old one in the same directory.
none of your application will be lost.
Once the installation is complete, you need to copy config.xml that you had placed in some other directory back to the Mydomain folder before starting the server.
hope this helps
bibek
23 years ago
hi
here is a simple example which involves two JSP, two form classes and an action class.Index jsp is loaded first. here you key in the username and click the ok button. it takes you to the other jsp named Accept.jsp which displays the user name. In the backend, when you click the button on index.jsp, the value of username is taken to the form bean and in the action class the data from the form bean of Index.jsp is retrieved and stored in the form bean of the Accept.jsp and the jsp is loaded. It automatically gets the data from the form bean and displays it on the Accept.jsp.
The following are the codes.
code of index.jsp..
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html>
<head>
<title>FIrst Example</title>
<html:base/>
</head>
<body bgcolor="white">
<html:errors/>
<html:form action="Index.do" focus="username" name="indexForm" type="testing.IndexForm">
<table border="0" width="100%">
<tr>
<th align="right">
Give Your Name
</th>
<td align="left">
<html:text property="username" size="16" maxlength="16"/>
</td>
</tr>
<tr>
<td align="right">
<html:submit property="submit" value="OK"/>
</td>
</tr>
</table>
</html:form>
</body>
</html>
code for accept.jsp
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<HTML>
<HEAD>
</HEAD>
<BODY>
<html:form action="" focus="output" name="AcceptForm" type="testing.AcceptForm">
<table border="0" width="100%">
<tr>
<th align="right">
Give Your Name
</th>
<td align="left">
<html:text property="output" size="16" maxlength="16"/>
</td>
</tr>
<tr>
<td align="right">
<html:submit property="submit" value="OK"/>
</td>
</tr>
</table>
</html:form>
</BODY>
</HTML>
code for the action class IndexAction
package testing;
import javax.servlet.http.*;
import javax.servlet.*;
import org.apache.struts.action.*;
import java.io.IOException;
public final class IndexAction extends Action {
public ActionForward perform (ActionMapping mapping,ActionForm form ,HttpServletRequest request,HttpServletResponse response) throws IOException,ServletException{
String username = ((IndexForm)form).getUsername();
AcceptForm acptform = new AcceptForm();
acptform.setOutput(username);
HttpSession session = request.getSession();
session.setAttribute("AcceptForm",acptform);
return mapping.findForward("success");
}
}
code for index form
package testing;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.*;

public final class IndexForm extends ActionForm{
private String username="subhendu";
public IndexForm()
{
}
public String getUsername()
{
return username;
}
public void setUsername(String username)
{
this.username=username;
}
}
code for acceptform
package testing;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.*;

public final class AcceptForm extends ActionForm{
private String output;
public AcceptForm()
{
}
public String getOutput()
{
return output;
}
public void setOutput(String output)
{
this.output="from accept bean"+output;
}
}
entry in action.xml
<action-mappings>
<action path="/Index"
actionClass="testing.IndexAction"
formAttribute="indexForm"
formClass="testing.IndexForm"
scope="session"
inputForm="/index.jsp"
validate="true">
<forward name="success" path="/Accept.jsp"/>
</action>
</action-mappings>
23 years ago

Originally posted by Koji Yamamoto:
Hello EveryBody!!
I'm trying to precompile JSP on WebLogic Server 6.1.
I already checked BEA's document, it indicate to edit 'jsp-descriptor' of 'web.xml', but 'jsp-descriptor' is in 'weblogic.xml'.
I have no idea what to do.
Please give me a sample xml or instructions.
Thanks for Reading.


keep the weblogic.jar file in the class path and then go to the command prompt in windows.go to the directory where alll the JSP are present and then type the following command.
java weblogic.jspc *.jsp
this will compile all the jsp and keep the class files there in the folder which you can use.
23 years ago
hi
I am using the oreily servlet multipart in weblogic
6.0 to upload a file. The maximum size of the file
that can be uploaded is set by myself to 10MB. When i
tried to upload a file of size greater than 10Mb the
following error came.
<Nov 29, 2001 3:33:40 PM GMT+05:30> <Error> <NT
Performance Pack> <failure in processSockets() -
GetData: 'weblogic.socket.GetData@d12e4 - fd: '1772',
numBytes:
'4096''
java.lang.NullPointerException
at
weblogic.socket.TunnelContext.getServlet(TunnelContext.java:24)
at
weblogic.servlet.internal.MuxableSocketHTTP.dispatch(MuxableSocketHTTP.java:465)
at
weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:638)
at
weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)>
<Nov 29, 2001 3:33:40 PM GMT+05:30> <Error> <HTTP>
<Connection failure
java.lang.NullPointerException
at
weblogic.socket.TunnelContext.getServlet(TunnelContext.java:24)
at
weblogic.servlet.internal.MuxableSocketHTTP.dispatch(MuxableSocketHTTP.java:465)
at
weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:638)
at
weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:
23)
at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)>
i am unable to guess if this is a server error or my
application error.After the error message is flashed
on the server console the server hangs. please help me
out and suggest any solution to over come it.
Thanks and Regards,
Bbek Kumar Agarwal
23 years ago