unregistered servlets in weblogic5.1

Hi

1)In am calling from javascript file:

parent.frames[1].hiddenfrm.action = "/servlet/login.AdminMainServlet";

For this the entry in weblogic properties file is:

weblogic.httpd.register./servlet/login.AdminMainServlet=login.AdminMainServlet

This works fine.

2) But now I am calling a servlet like this, from a javascript file:

window.open("../../servlet/Sales.ProdResrvServlet?mode=addition&act=CustomerPopup&cmpcd="+cmpcd+"&finyr="+finyr+"&searchby=sname", "CustomerPopup", "width=725, height=200, top= 5, left=60");

how can i call a unregistered servlet?..Even i commented for servletservlet, weblogic.httpd.register.servlets=weblogic.servlet.ServletServlet

My directory structure for servlets is:

C:\weblogic\myserver\servletclasses\sales

C:\weblogic\myserver\servletclasses\login

But i am calling the servlets like above,because i am shifting from someother webserver to weblogic5.1

Cheers

[1011 byte] By [malu4ram] at [2007-9-26 1:15:03]
# 1
If you don't want to register a servlet in weblogic.properties file , then use your web.xml file to register your servlets. I prefer the second as then your WebApp will be J2EE compliant and you can move across J2EE platforms quite easily
shubhrajit_c at 2007-6-29 0:40:55 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Could you please give me the steps ?... Thanks in advance
malu4ram at 2007-6-29 0:40:55 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Sample web.xml

<!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>com.final1.servlets.LoginServlet</servlet-name>

<servlet-class>com.final1.servlets.LoginServlet</servlet-class>

</servlet>

<servlet>

<servlet-name>RouterServlet</servlet-name>

<servlet-class>com.final1.servlets.RouterServlet</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>com.final1.servlets.LoginServlet</servlet-name>

<url-pattern>/com.final1.servlets.LoginServlet</url-pattern>

</servlet-mapping>

<servlet-mapping>

<servlet-name>RouterServlet</servlet-name>

<url-pattern>/RouterServlet</url-pattern>

</servlet-mapping>

</web-app>

shubhrajit_c at 2007-6-29 0:40:55 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
Do i need to create one web.xml with my servlets entered again with their path ?..where shall i copy this file ?...I am confused...'cause again its sort of registering..more than that, i will be calling servlets with parameters in URL....please help
malu4ram at 2007-6-29 0:40:55 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

Servlet name is basically a reference.........

Class name is the servlet class .They should be located in WEB-INF/classes folder

URL pattern is the actual URL(excluding parameters) used to access the servlet

thus the login servlet in my case will be accessed as

http://domain:port/com.final1.servlets.LoginServlet

after that you can enter parameters if u like

shubhrajit_c at 2007-6-29 0:40:55 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...