URGENT: servlets in weblogic.
I am trying to run the servlets in bea weblogic server 6.1..
but when it gives "405- Resource not allowed." ..error..I have double checked all the files and my XML code in web.xml file ..but no luck....
can anyone please help?
i ve tried removin servlet mapping tag as you said but no luck ...:(
well lets go step by step
here is my web.xml file
<?xml version="1.0" ?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 1.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<servlet>
<servlet-name>edge</servlet-name>
<servlet-class>edge</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>edge</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
and my servlet is compiled without error and i ve copied it to the web-inf/classes folder...
now when i run my server...without servlet mapping tag
i get this error
Error 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
and when i run myservlet with the servlet mapping tag
it give this error
The page cannot be displayed
The page you are looking for cannot be displayed because the address is incorrect.
Please try the following:
If you typed the page address in the Address bar, check that it is entered correctly.
Open the localhost:7001 home page and then look for links to the information you want.
Click Search to look for information on the Internet.
HTTP 405 - Resource not allowed
Internet Explorer
now wat shoud i do..please help me:)
thanks for your prompt response
Similar Messages
-
SUPER URGENT: servlets in weblogic
I am trying to run the servlets in bea weblogic server 6.1..
but when i try to run my servlets, it gives "405- Resource not allowed." ..error..I have double checked all the files and my XML code in web.xml file ..but no luck....
can anyone please help?
here is my web.xml file
<?xml version="1.0" ?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 1.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<servlet>
<servlet-name>edge</servlet-name>
<servlet-class>edge</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>edge</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
when i run myservlet i enter this to run my servlet
http://localhost:7001/edge
but it is giving me the following error..can anyone please help
The page cannot be displayed
The page you are looking for cannot be displayed because the address is incorrect.
Please try the following:
If you typed the page address in the Address bar, check that it is entered correctly.
Open the localhost:7001 home page and then look for links to the information you want.
Click Search to look for information on the Internet.
HTTP 405 - Resource not allowed
Internet Explorer
anyone..please respond as soon as possible i ve to do an assignment..thanksI ve tried this...but no use...
there is someother problem
...most interesting is that i ve two computers...on one computer the above method is working but on my second computer there are exactly the configurations of weblogic..but it not running
please tell me if you know something else
thanks -
How to run servlet in weblogic 8.1
hi!
i m new to weblogic.how to run servlet in weblogic8.1.i get lot of errors when i compile it in command prompt.but when i do the same thing in tomcat,i dont get errors & it runs successfully.help me out.how to compile servlets in weblogic 8.1.some say i have to create .jar file.pls tell me the procedure.i m new to j2ee.i have installed jdk1.5 .
pls its urgenta lot of error....
mmmm no sorry, i don't see
it remembers me when i was dating sarah,it was very difficult... but now i'm dating anne it's really easier... any idea on what was going wrong with sarah?
ok sorry for this allegory, just tired to ask always the same thing:
WHAT ERRORS??? -
Error while calling servlet in WebLogic
Hi,
We are trying to call servlet in WebLogic by using http://scrmskr.apac.nsroot.net:7801/forms/HelloWorldServlet URL and getting
below error.
========================================================================
Error 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
========================================================================
Here we are calling HelloWorldServlet servlet which is kept in below path
/rcrmap2/weblogic/bea/user_projects/domains/frmrep_rcrms/servers/WLS_FORMS/tmp/_WL_user/formsapp_11.1.1/e18uoi/war/WEB-INF/classes
Entries for HelloWorldServlet in web.xml:
========================================================================
<servlet>
<servlet-name>HelloWorldServlet</servlet-name>
<servlet-class>HelloWorldServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>frmservlet</servlet-name>
<url-pattern>/frmservlet/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>HelloWorldServlet</servlet-name>
<url-pattern>/HelloWorldServlet*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>lservlet</servlet-name>
<url-pattern>/lservlet/*</url-pattern>
</servlet-mapping>
========================================================================
HelloWorldServlet.java:
===============================================================================
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class HelloWorldServlet extends HttpServlet {
public void service(HttpServletRequest req,
HttpServletResponse res)
throws IOException
// Must set the content type first
res.setContentType("text/html");
// Now obtain a PrintWriter to insert HTML into
PrintWriter out = res.getWriter();
out.println("<html><head><title>" +
"Hello World!</title></head>");
out.println("<body><h1>Hello World!</h1></body></html>");
===============================================================================
Please share your inputs as to what needs to be done for the same.
Thanks & Regards,
HarishHi Jay,
Please also find forms.conf_ entries
========================================================================
# Name
# forms.conf - Forms component Apache directives configuration file.
# Purpose
# It should include the weblogic managed server (routing) directives for
# the servers where Forms applications are deployed and other miscellaneous
# Forms component OHS directives.
# Remarks
# This file is included with the OHS configuration under
# $OI/config/OHS/<OHS Node Name>/moduleconf sub-directory.
# virtual mapping for the /forms/html mapping.
RewriteEngine on
RewriteRule ^/forms/html/(..*) /workaroundhtml/$1 [PT]
RewriteRule ^/rcrms/html/(..*) /workaroundhtml/$1 [PT]
AliasMatch ^/workaroundhtml/(..*) "/rcrmap2/weblogic/bea/rcrms/config/FormsComponent/forms/html/$1"
AliasMatch ^/forms/frmjscript/(..*) "/rcrmap2/weblogic/bea/user_projects/domains/frmrep_rcrms/servers/WLS_FORMS/tmp/_WL_user/formsapp_11.1.1/e18uoi/war/frmjscript/$1"
AliasMatch ^/rcrms/icons/(..*) "/rcrmap2/weblogic/bea/ORA_PFRD/forms/java/$1"
# Virtual path mapping for Forms Java jar and class files (codebase)
AliasMatch ^/forms/java/(..*) "/rcrmap2/weblogic/bea/ORA_PFRD/forms/java/$1"
# Virtual path mapping for testcrms (codebase)
AliasMatch ^/rcrms/java/(..*) "/rcrmap2/weblogic/bea/ORA_PFRD/forms/java/$1"
AliasMatch ^/forms/(..*) "/rcrmap2/weblogic/bea/user_projects/domains/frmrep_rcrms/servers/WLS_FORMS/tmp/_WL_user/formsapp_11.1.1/e18uoi/war/WEB-INF/classes/$1"
AliasMatch ^/rcrms/(..*) "/rcrmap2/weblogic/bea/user_projects/domains/frmrep_rcrms/servers/WLS_FORMS/tmp/_WL_user/formsapp_11.1.1/e18uoi/war/WEB-INF/classes/$1"
AliasMatch ^/rcrms/WebCLAuth/* rcrms
<Location /forms>
SetHandler weblogic-handler
WebLogicHost kauh0079
WebLogicPort 8001
</Location>
========================================================================
Thanks & Regards,
Harish -
404 error while invoking servlet in weblogic 6.0
Hi,
When I try to invoke a servlet from weblogic 6.0, I am getting
404 error. I have copied the HelloWorldServlet class into defaultWebAppl_Server/WEB_INF/CLASSES
directory and when I invoke the HelloWorldservlet, its giving file
not found(404) error. I am doing exactly what has been given in
the "quick start to servlets" in weblogic 6.0. I am using Windows
NT.
I have also another problem when I use java utils.dbping to test
the connection to my oracle8.1.8, its giving licence file not found.
Could some one help me out from this.
Thanks in advance,
Ramu
Hi kumar,
I have been keep trying to solve that. After some time Suddenly
"Error 404" disappeared and instead "Error 500" came. Okay kumar,
here is what I am doing...
I have installed weblogic6.0(eval), oracle 8.1.6 on Windows NT4.0.
I have installed oracle Enterprise edition from CD "ORACLE 8.1.6
for NT".
I installed the weblogic under D: drive.
I did class path settings as given in documentation. But Iam not
sure whether I need to do any other class path settings.
I was able to run pet store application given in weblogic server.
I went to "quick start" section and ran HelloWorld.jsp page from
"DefaultWebApp_myServer" directory.
I was not able to run servlet program as per given in the "quick
start". I am getting
"Error 500---Internal server error"
The server encountered an unexpected condition which prevented
it from fulfilling the request"
I have modified the web.xml under WEB-INF of DefaultWebApp_myServer
as per given in the quick start.
Here is the quick start link For you reference(as what I talking
about)
http://edocs.beasys.com/wls/docs60/quickstart/quick_start.html
In the web.xml, I have given <servlet-class> as just HelloWorldServlet,
since I directly copied the file from some other examples directory.
But still I am getting 500 error.
Here is the url that I am invoking...Http://ramup:7001/quickStartServlet
Coming to your oracle connection test, I did exactly what you said.
kumar, I have executed the command
"D:\bea\wlserver6.0\config\mydomain>java -classpath %classpath%;D:\bea
utils.dbping ORACLE
>scott tiger TestDB"
Where TestDB is the database that I have created while installing,
but I am not aware of the instance you said.
Here is what I got after executing the command.
--------*******-------Pasting the ms-dos command results----**-
// This mode is superior, especially in serverside classes because
// it avoids DriverManager calls are class synchronized, and will
// bottleneck any other JDBC in the server, even already-running
// connections, because all JDBC drivers use DriverManager.println()
// to log info and exceptions, and that call is also class synchronized.
// For repeated connecting, a single driver instance can be re-used.
**** or ****
Class.forName("weblogic.jdbc.oci.Driver").newInstance();
java.sql.Connection conn =
DriverManager.getConnection("jdbc:weblogic:oracle:TestDB", "scott",
"tiger")
**** or ****
java.util.Properties props = new java.util.Properties();
props.put("user", "scott");
props.put("password", "tiger");
props.put("server", "TestDB");
Class.forName("weblogic.jdbc.oci.Driver").newInstance();
java.sql.Connection conn =
DriverManager.getConnection("jdbc:weblogic:oracle", props);
D:\bea\wlserver6.0\config\mydomain>
--------*******-------Pasting the ms-dos command results----**-
I think I have connection to database, thanks for your suggestion.
Kumar, I have not seen weblogic.properties file any where in D:\bea
directory.
Kumar, if you have some time can you jot down the classpath settings
and path settings for executing SERVLETS/EJB programs.
Thanks for helping me out..,
Ramu
Kumar Allamraju <[email protected]> wrote:
>Assuming you registered the helloworld servlet in web.xml,
>could you show me the url
>that you typed in the browser window? :)
>
>
>Regarding the dbping problem, make sure license.bea is
>in the classpath
>
>ie.. java -classpath %classpath%;D:\bea utils.dbping ORACLE
>scott tiger [instance-name]
>
>PS: I'm assuming WLS is installed in D:\bea directory.
>
>--
>Kumar
>
>
>Ramu wrote:
>
>> Hi,
>>
>> When I try to invoke a servlet from weblogic 6.0, I
>am getting
>> 404 error. I have copied the HelloWorldServlet class
>into defaultWebAppl_Server/WEB_INF/CLASSES
>> directory and when I invoke the HelloWorldservlet, its
>giving file
>> not found(404) error. I am doing exactly what has been
>given in
>> the "quick start to servlets" in weblogic 6.0. I am
>using Windows
>> NT.
>>
>> I have also another problem when I use java utils.dbping
>to test
>> the connection to my oracle8.1.8, its giving licence
>file not found.
>>
>> Could some one help me out from this.
>>
>> Thanks in advance,
>> Ramu
>
-
A problem with servlets with WebLogic 4.5.1 SP11
Hello,
We have developed a client that connects to servlets in WebLogic 4.5.1. Some of the servlets use sessions to store data, and they receive some parameters from the client to retrieve information from a database.
When we use WebLogic 4.5.1, everything works fine. However, when we upgrade it to Service Pack 11, we find a problem. If we make a servlet that receives some parameters, but it does no use sessions, everything is correct. If we make a servlet that does not receive any parameter, and we use sessions, we find no problem either. But if we make a servlet that receives parameters and uses sessions within the doPost() method, there is an exception when we call the method Request.getSession(true).
I would thank any help about this point, since I'm not sure if this is the result of a bug, or if there is a new parameter that we have to set in the file weblogic.properties, or any other reason.
The code of our servlet is as simple as follows:
public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
ObjectInputStream in = new ObjectInputStream(request.getInputStream());
String arg = null;
String arg2 = null;
String arg3 = null;
try{
arg = (String)in.readObject();
arg2 = (String)in.readObject();
arg3 = (String)in.readObject();
}catch(Exception e){
// Get the session and the counter param attribute
HttpSession session = request.getSession(true);
// WE GET THE EXCEPTION AT THIS POINT.
Integer ival = (Integer) session.getValue("simplesession.counter");
if (ival == null)
// Initialize the counter
ival = new Integer(1);
else
// Increment the counter
ival = new Integer(ival.intValue() + 1);
// Set the new attribute value in the session
session.putValue("simplesession.counter", ival);
// Output data
ObjectOutputStream out = new ObjectOutputStream(response.getOutputStream());
out.writeObject(ival);
out.close();
On the other hand, the client invokes the serlvets using the following code:
public int servletClient(String usuario,String password) {
int numero = 0;
try{
// Input parameters
Serializable[] objs = {"login",usuario, password};
// Invokes the servlet
ObjectInputStream in = ServletWriter.postObjects(urlServlet, objs); // SEE BELOW...
// Get the results
numero = ((Integer)in.readObject()).intValue();
in.close();
}catch(Exception e){
e.printStackTrace();
static public ObjectInputStream postObjects(URL servlet, Serializable objs[]) throws Exception
URLConnection con = servlet.openConnection();
con.setDoInput(true);
con.setDoOutput(true);
con.setUseCaches(false);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
// Write the arguments as post data
ObjectOutputStream out = new ObjectOutputStream(con.getOutputStream());
int numObjects = objs.length;
for (int x = 0; x < numObjects; x++) {
out.writeObject(objs[x]);
out.flush();
out.close();
return new ObjectInputStream( con.getInputStream() );
// THE CLIENT CODE FINISHES HERE
The exception we get is the following:
Mon Feb 21 13:47:41 GMT-02:00 2000:<E> <ServletContext-Servlets> Servlet failed with RuntimeException
Mon Feb 21 13:47:41 GMT-02:00 2000:<E> <ServletContext-Servlets> java.io.IOException: Unexpected end of POST data. Read 0 bytes. Content-length = 20
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.io.IOException.<init>(Compiled Code)
at weblogic.servlet.internal.ServletRequestImpl.mergePostParams(Compiled Code)
at weblogic.servlet.internal.ServletRequestImpl.parseQueryParams(Compiled Code)
at weblogic.servlet.internal.ServletRequestImpl.getParameter(Compiled Code)
at weblogic.servlet.internal.ServletRequestImpl.initSessionInfo(Compiled Code)
at weblogic.servlet.internal.ServletRequestImpl.getSession(Compiled Code)
at SGBA.servlets.HelloWorldServlet.doPost(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled Code)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled Code)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled Code)
at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code)
at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)
--------------- nested within: ------------------
weblogic.utils.NestedRuntimeException: cannot parse POST parameters of request /HelloWorldServlet
- with nested exception:
[java.io.IOException: Unexpected end of POST data. Read 0 bytes. Content-length = 20]
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at weblogic.utils.NestedRuntimeException.<init>(Compiled Code)
at weblogic.servlet.internal.ServletRequestImpl.mergePostParams(Compiled Code)
at weblogic.servlet.internal.ServletRequestImpl.parseQueryParams(Compiled Code)
at weblogic.servlet.internal.ServletRequestImpl.getParameter(Compiled Code)
at weblogic.servlet.internal.ServletRequestImpl.initSessionInfo(Compiled Code)
at weblogic.servlet.internal.ServletRequestImpl.getSession(Compiled Code)
at SGBA.servlets.HelloWorldServlet.doPost(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled Code)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled Code)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled Code)
at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code)
at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)
I hope all this information can help you making an idea of our problem. We will be looking forward to receiving your answer.
Thanks in advance,
Frankie Carrero.
Hello,
We have developed a client that connects to servlets in WebLogic 4.5.1. Some of the servlets use sessions to store data, and they receive some parameters from the client to retrieve information from a database.
When we use WebLogic 4.5.1, everything works fine. However, when we upgrade it to Service Pack 11, we find a problem. If we make a servlet that receives some parameters, but it does no use sessions, everything is correct. If we make a servlet that does not receive any parameter, and we use sessions, we find no problem either. But if we make a servlet that receives parameters and uses sessions within the doPost() method, there is an exception when we call the method Request.getSession(true).
I would thank any help about this point, since I'm not sure if this is the result of a bug, or if there is a new parameter that we have to set in the file weblogic.properties, or any other reason.
The code of our servlet is as simple as follows:
public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
ObjectInputStream in = new ObjectInputStream(request.getInputStream());
String arg = null;
String arg2 = null;
String arg3 = null;
try{
arg = (String)in.readObject();
arg2 = (String)in.readObject();
arg3 = (String)in.readObject();
}catch(Exception e){
// Get the session and the counter param attribute
HttpSession session = request.getSession(true);
// WE GET THE EXCEPTION AT THIS POINT.
Integer ival = (Integer) session.getValue("simplesession.counter");
if (ival == null)
// Initialize the counter
ival = new Integer(1);
else
// Increment the counter
ival = new Integer(ival.intValue() + 1);
// Set the new attribute value in the session
session.putValue("simplesession.counter", ival);
// Output data
ObjectOutputStream out = new ObjectOutputStream(response.getOutputStream());
out.writeObject(ival);
out.close();
On the other hand, the client invokes the serlvets using the following code:
public int servletClient(String usuario,String password) {
int numero = 0;
try{
// Input parameters
Serializable[] objs = {"login",usuario, password};
// Invokes the servlet
ObjectInputStream in = ServletWriter.postObjects(urlServlet, objs); // SEE BELOW...
// Get the results
numero = ((Integer)in.readObject()).intValue();
in.close();
}catch(Exception e){
e.printStackTrace();
static public ObjectInputStream postObjects(URL servlet, Serializable objs[]) throws Exception
URLConnection con = servlet.openConnection();
con.setDoInput(true);
con.setDoOutput(true);
con.setUseCaches(false);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
// Write the arguments as post data
ObjectOutputStream out = new ObjectOutputStream(con.getOutputStream());
int numObjects = objs.length;
for (int x = 0; x < numObjects; x++) {
out.writeObject(objs[x]);
out.flush();
out.close();
return new ObjectInputStream( con.getInputStream() );
// THE CLIENT CODE FINISHES HERE
The exception we get is the following:
Mon Feb 21 13:47:41 GMT-02:00 2000:<E> <ServletContext-Servlets> Servlet failed with RuntimeException
Mon Feb 21 13:47:41 GMT-02:00 2000:<E> <ServletContext-Servlets> java.io.IOException: Unexpected end of POST data. Read 0 bytes. Content-length = 20
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.io.IOException.<init>(Compiled Code)
at weblogic.servlet.internal.ServletRequestImpl.mergePostParams(Compiled Code)
at weblogic.servlet.internal.ServletRequestImpl.parseQueryParams(Compiled Code)
at weblogic.servlet.internal.ServletRequestImpl.getParameter(Compiled Code)
at weblogic.servlet.internal.ServletRequestImpl.initSessionInfo(Compiled Code)
at weblogic.servlet.internal.ServletRequestImpl.getSession(Compiled Code)
at SGBA.servlets.HelloWorldServlet.doPost(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled Code)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled Code)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled Code)
at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code)
at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)
--------------- nested within: ------------------
weblogic.utils.NestedRuntimeException: cannot parse POST parameters of request /HelloWorldServlet
- with nested exception:
[java.io.IOException: Unexpected end of POST data. Read 0 bytes. Content-length = 20]
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(Compiled Code)
at weblogic.utils.NestedRuntimeException.<init>(Compiled Code)
at weblogic.servlet.internal.ServletRequestImpl.mergePostParams(Compiled Code)
at weblogic.servlet.internal.ServletRequestImpl.parseQueryParams(Compiled Code)
at weblogic.servlet.internal.ServletRequestImpl.getParameter(Compiled Code)
at weblogic.servlet.internal.ServletRequestImpl.initSessionInfo(Compiled Code)
at weblogic.servlet.internal.ServletRequestImpl.getSession(Compiled Code)
at SGBA.servlets.HelloWorldServlet.doPost(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled Code)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled Code)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled Code)
at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code)
at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)
I hope all this information can help you making an idea of our problem. We will be looking forward to receiving your answer.
Thanks in advance,
Frankie Carrero.
-
Error 500 while deploying Servlets using Weblogic 5.1
hi,
i have followed all the intructions on how to run servlets in weblogic 5.1 server.
till yesterday i have done nearly 10 servlets which worked perfectly. but today
when i coded a new servlet and started running using internet explorer it gave
"Error 500--Internal Server Error
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.5.1 500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling
the request. "
can u please give me the solution .
regards,
anitha
how this newly coded servlet is different from the other servlets?
Http 500 errror means some "internal error" happened while processing your request.
Do you see any error messages or stack trace on the server console?
Kumar
Anitha wrote:
> hi,
>
> i have followed all the intructions on how to run servlets in weblogic 5.1 server.
> till yesterday i have done nearly 10 servlets which worked perfectly. but today
> when i coded a new servlet and started running using internet explorer it gave
>
> "Error 500--Internal Server Error
>
> From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
>
> 10.5.1 500 Internal Server Error
>
> The server encountered an unexpected condition which prevented it from fulfilling
> the request. "
>
> can u please give me the solution .
>
> regards,
> anitha
>
>
>
-
Servlet in WebLogic Server 6.0
I am trying to run a servlet from WebLogic Server 6.0
Copied servlet class file into the following directory:
config/mydomain/applications/
DefaultWebApp_myserver/
WEB-INF/classes
Modified the web.xml file located in the config/mydomain/applications/
DefaultWebApp_myserver/
WEB-INF/ directory
<web-app>
<servlet>
<servlet-name>
CustLogin
</servlet-name>
<servlet-class>
lawson.servlet.CustLogin
</servlet-class>
<init-param>
<param-name>url</param-name>
<param-value> http:/localhost:7001/CustLogin/custaddr.html</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>
CustLogin
</servlet-name>
<url-pattern>
/CustLogin/*
</url-pattern>
</servlet-mapping>
</web-app>
Run servlet from a Web browser with URL:
http://localhost:7001/CustLogin
Servlet Exception
<<Error> <HTTP> <saluki2> <myserver> <ExecuteThread-11> <> <> <101018>
<[WebAppServletContext(944251,DefaultWebApp_myserver)] Servlet
failed with ServletException>
javax.servlet.ServletException: Servlet class: 'lawson.servlet.CustLogin'
could not be resolved - a class upon which this class depends wasn't
found
Deepak,
Are all the classes used by CustLogin in System Classpath or under
web-inf\classes directory?
Kumar.
Deepak wrote:
> I am trying to run a servlet from WebLogic Server 6.0
>
> Copied servlet class file into the following directory:
> config/mydomain/applications/
> DefaultWebApp_myserver/
> WEB-INF/classes
>
> Modified the web.xml file located in the config/mydomain/applications/
>
> DefaultWebApp_myserver/
> WEB-INF/ directory
>
> <web-app>
>
> <servlet>
> <servlet-name>
> CustLogin
> </servlet-name>
> <servlet-class>
> lawson.servlet.CustLogin
> </servlet-class>
> <init-param>
> <param-name>url</param-name>
> <param-value> http:/localhost:7001/CustLogin/custaddr.html</param-value>
>
> </init-param>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>
> CustLogin
> </servlet-name>
> <url-pattern>
> /CustLogin/*
> </url-pattern>
> </servlet-mapping>
> </web-app>
>
> Run servlet from a Web browser with URL:
> http://localhost:7001/CustLogin
>
> Servlet Exception
>
> <<Error> <HTTP> <saluki2> <myserver> <ExecuteThread-11> <> <> <101018>
> <[WebAppServletContext(944251,DefaultWebApp_myserver)] Servlet
> failed with ServletException>
> javax.servlet.ServletException: Servlet class: 'lawson.servlet.CustLogin'
> could not be resolved - a class upon which this class depends wasn't
> found
>
-
Deploying Servlets in Weblogic 8.1
Hi,
I have deployed servlets in Weblogic 8.1 server. The deployment was successful, but when I try to access the servlet it gives me java.lang.UnsupportedClassVersionError. It also says that it is unable to find the servlet class.
Can anyone help me with this?
Regards
Ushahi
can u check your supported configuration
this might because of incompatable JDK
a method writeObject(ObjectOutputStream) must be implemented in UTCDate to cover the JDK implementation difference of java.util.TimeZone between jdk 1.3.x and jdk 1.4.x. This is required to cover the member 'localeTimeZone' in UTCDate. Please refer to the source code of java.util.Calendar.writeObject(ObjectOutputStream) for an equivalent implementation for the member 'zone'.
Prasanna Yalam -
Using servlet in weblogic server
hi, guys,
I have done quite a few research about using servlet in weblogic server, but still can't get it work, hope you guys can provide some suggestion. Thank you in advance.
I have a folder structure like this:
There is a "Jsp" folder under the "WebContent", and there is a configJsp.jsp file inside this folder, which is:<br>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%> <br>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><br>
<html> <br>
<head> <br>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <br>
<title>Insert title here </title> <br>
</head> <br>
<body> <br>
<form method="POST" action="Config"> <br>
<input type="text" name="myText"/> <br>
<input type="submit" name="mySubmit" value="submit"> <br>
</form> <br>
</body> <br>
</html> <br>
And then under the "Java Resources", there is a "servlet" package, there is a ConfigServlet.java file inside, which is like this:
<br>
package servlet; <br>
<br>
import java.io.*; <br>
import javax.servlet.*; <br>
import javax.servlet.http.*; <br>
public class ConfigServlet extends HttpServlet <br>
{ <br>
public void doGet(HttpServletRequest request,HttpServletResponse response) <br> throws ServletException,IOException <br>
{ <br>
doPost(request, response); <br>
} <br>
<br>
public void doPost(HttpServletRequest request,HttpServletResponse response) <br> throws ServletException,IOException <br>
{ <br>
String textContent=request.getParameter("myText"); <br>
response.setContentType("text/html"); <br>
PrintWriter out = response.getWriter(); <br>
out.println(" <html>"); <br>
out.println(" <head> <title>ServletCommit </title> </head>"); <br>
out.println(" <body>"); <br>
out.println(textContent); <br>
out.println(" </body> </html>"); <br>
} <br>
} <br>
and I add the following mapping configuration into web.xml:
<servlet> <br>
<servlet-name>Config </servlet-name> <br>
<servlet-class>servlet.ConfigServlet </servlet-class> <br>
</servlet> <br>
<servlet-mapping> <br>
<servlet-name>Config </servlet-name> <br>
<url-pattern>/Jsp/* </url-pattern> <br>
</servlet-mapping> <br><br>
I run the application, click "submit", and got the following error message:<br>
Error 404--Not Found <br>
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found<br>
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.<br><br>
If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address. <br><br>
I guess there might be something wrong with the jsp and servlet mapping, but don't know what exactly it is, and have tried to change some configuration as well, but they don't work. This has annoyed me for a few days, hope there is someone who can be so kind to help me out of this. Thank you again.
nullto james.bayer:<br>
I tried modifying my web.xml like the following:<br><br>
<servlet><br>
<servlet-name>Config</servlet-name><br>
<servlet-class>servlet.ConfigServlet</servlet-class><br>
</servlet><br>
<servlet-mapping><br>
<servlet-name>Config</servlet-name><br>
<url-pattern>/Config</url-pattern><br>
</servlet-mapping><br><br>
is that what you mean? but the same error appear again, it doesn't seem to be able to find the servlet.<br><br>
I am using an BEA workshop for weblogic platform 10.0. Actually, I am trying to develop a portal, and I need a jsp to be included in it, and will need to deal with the form submit. The jsp is under a portal application, does it matter? Or is it different with a normal dynamic web application? Thank you for your advice. -
Using ejb service from a servlet in Weblogic 6.0sp1
anybody had sucess using ejb service from a servlet in Weblogic
6.0sp1 ?
It worked in Weblogic 6.0. But in 6.0sp1, the servlet startup always
return me "ClassCastException"
when narrowing a lookup of an ejbHome to the specific class.
Using this same ejb service from a standalone Java client wotked
fine in both versions.
Any body has aby clue ?
Help greatly appreciated
hyliu
The ejbc'ed jar needs to be in the CLASSPATH of the servlet server.
Gene
"Haiyang Liu" <[email protected]> wrote in message news:3ab2670c$[email protected]..
>
> anybody had sucess using ejb service from a servlet in Weblogic
> 6.0sp1 ?
>
> It worked in Weblogic 6.0. But in 6.0sp1, the servlet startup always
> return me "ClassCastException"
> when narrowing a lookup of an ejbHome to the specific class.
> Using this same ejb service from a standalone Java client wotked
> fine in both versions.
>
> Any body has aby clue ?
>
> Help greatly appreciated
>
> hyliu
>
-
I am trying to learn to debug servlet on weblogic . In one of the site it is written as
Locate startWSL.cmd and add the following variable DEBUG_OPTS:
set DEBUG_OPTS = -Xdebug -Xrunjdwp:transport= dt_socket,address=1044,server=y,suspend=n
I am confused with this .Please tell me why is this necessary for debugging.
Thank youJava uses the Java Platform Debugger Architecture to define how a Java debugger connects to a running Java application for the purpose of debugging that application. To enable an application for debugging, you have to add some parameters to the command line to specify a few things, like what transport will be used to transfer data, and if a socket-based transport, what port number should be used. Once you define those parameters on the command line and the application is running, you can specify the port number in the debug configuration of your debugger to make a connection to that running application.
You can read more about the various debugging-related command line options on the following page, which is just part of the larger JPDA documentation:
[http://java.sun.com/javase/6/docs/technotes/guides/jpda/conninv.html]
If you peruse the documentation for your favorite debugger, you can find information about connecting to remote Java applications, and it should give you similar information. -
Restricting access to a particular servlet in Weblogic
Thanx in advance for reading and replying to this query.
I have an application running under a domain.
This application has two servlets.
I want that whenever a user hits one servlet, weblogic's authentication window should pop up.
I know this could be achieved by making entry for <security-constraint >.
But how?
Please advise.
Regards,
Vikasin your web.xml where /MyServletURL is the url that you mapped your servlet to:
<security-constraint>
<web-resource-collection>
<web-resource-name>Weblog3</web-resource-name>
<description>
Test of web application security
</description>
<url-pattern>/MyServletURL</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<description>
These are the roles who have access
</description>
<role-name>
webappRole1
</role-name>
</auth-constraint>
<user-data-constraint>
<description>
This is how the user data must be transmitted
</description>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
<security-role>
<description>
An administrator
</description>
<role-name>
webappRole1
</role-name>
</security-role>Then in the weblogic.xml file where cust is a group that you have created in Weblogic using the console. You can then assign users to the group so that they can access the servlet:
<weblogic-web-app>
<security-role-assignment>
<role-name>webappRole1</role-name>
<principal-name>cust</principal-name>
</security-role-assignment>
</weblogic-web-app> -
Error logging for servlets in Weblogic 5.1?
Where are errors that occur in servlets logged in 5.1? I have a servlet
that one of the classes it instantiates during the init() method to load a
native library (.dll). On the console, there is a message saying
"unavailable or initialization problem". But I can't seem to find any error
logs that would tell me what happened.
Also, are there any special configuration settings I will need to make in
order to allow the servlet to load the native library?
how is the weblogic.properties configured?
how do you run the BWLS ? memory (M)?
is the documentroot and the WEBLOGIC JSP PROPERTIES right ? -
Java Stored Procedure calling HTTP Servlet in Weblogic
I am currently working on an e-commerce application for a brick-n-mortar electronics store. The store currently has an Oracle database that contains all of the products the store sells. The e-commerce site will have a separate Oracle database. Both database are Oracle 9i release 2 databases. The e-commerce site will be using BEA's Weblogic as its application server. I need to move data from the store db into the e-commerce db. The actual moving of the data is not the issue. The issue comes from needing to call several methods on a Stateless Session EJB, loaded on the Weblogic server, to perform backend processing. I wanted to make a JNDI call from a Java Stored Procedure but with Release 2, this option is no longer supported. The release notes (http://otn.oracle.com/tech/java/htdocs/9idb2_java.html) indicated that the JVM now supports calling out to Servlets using HTTP Client from a Java Stored Procedure.
Has anyone done this? Is there any sample code available?
Thanks for any help.I am currently working on an e-commerce application for a brick-n-mortar electronics store. The store currently has an Oracle database that contains all of the products the store sells. The e-commerce site will have a separate Oracle database. Both database are Oracle 9i release 2 databases. The e-commerce site will be using BEA's Weblogic as its application server. I need to move data from the store db into the e-commerce db. The actual moving of the data is not the issue. The issue comes from needing to call several methods on a Stateless Session EJB, loaded on the Weblogic server, to perform backend processing. I wanted to make a JNDI call from a Java Stored Procedure but with Release 2, this option is no longer supported. The release notes (http://otn.oracle.com/tech/java/htdocs/9idb2_java.html) indicated that the JVM now supports calling out to Servlets using HTTP Client from a Java Stored Procedure.
Has anyone done this? Is there any sample code available?
Thanks for any help. Hi,
sorry we have not yet formally documented this but here is a code snippet
Kuassi
/* HttpCallout - simple test to callout to static pages from Java Stored
Procedures */
import java.io.IOException;
import java.io.InputStream;
import HTTPClient.HTTPConnection;
import HTTPClient.HTTPResponse;
import HTTPClient.AuthorizationInfo;
public class HttpCallout {
public static void main(String[] argv) throws InterruptedException {
HttpCallout t = new HttpCallout(argv);
t.run();
private String[] argv ;
HttpCallout(String[] argv) {
this.argv = argv;
void initSSL() {
public void run() {
try {
if ( argv.length == 0 ) {
System.out.println("HttpCallout " +
"protocol " +
"host " +
"port " +
"page ");
return;
// process arguments
int argc = 0;
String protocol = argv[argc++];
String host = argv[argc++];
int port = Integer.parseInt(argv[argc++]);
String page = argv[argc++];
// Debugging - don't set for now
// System.setProperty("HTTPClient.log.mask", "3");
// noop
initSSL();
// Grab HTTPConnection
HTTPConnection con = new HTTPConnection(protocol, host, port);
con.setTimeout(20000);
con.setAllowUserInteraction(false);
// Grab Response
HTTPResponse rsp = con.Get(page);
byte[] data = rsp.getData();
if ( data == null ) {
System.out.println("no data");
} else {
System.out.println("data length " + data.length);
System.out.println(new String(data));
catch ( Throwable ex ) {
ex.printStackTrace();
Maybe you are looking for
-
T400 case number and replacement part?
I have a clients T400 that has come out of warranty. His 160GB HD died. I called Lenovo first to make sure the machine was out of warranty, the tech advise me that is way and gave me the HD FRU number and the phone number to call to get a replacement
-
Flex 2 SWF not loading on the web browser when Flash Player 8 is running
I got a Flex 2 application that is not loading on the web browser when the users workstations got Macromedia Flash Player 8 installed. Please advice on what could be the issue, i got security calls included i.e. securty.allowInsucureDomain, crossdoma
-
I purchased my MBP back in August of 2009 and it has been virtually flawless since I have bought it. However I have downloaded all kinds of stuff to it and added all kinds of different things to it, I have a pretty large music library and what I woul
-
Can i buy an unloacked i phone 5 in the us? how much would it be
can i buy an unloacked i phone 5 in the us? how much would it be
-
Trouble importing from Canon HG10
I have a Canon HG10 camera (HDD, AVCHD). I'm having trouble importing to iMovie '09 (8.0.6). Initially the camera was not being detected by iMovie at all (it did mount on the desktop). Searching the forums (here and elsewhere) it seemed that this was