File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes Probs in deploying a sample web app using WLS81 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Probs in deploying a sample web app using WLS81" Watch "Probs in deploying a sample web app using WLS81" New topic
Author

Probs in deploying a sample web app using WLS81

Saurabh Gour
Greenhorn

Joined: Sep 09, 2003
Posts: 3
I am trying to deploy a sample web app.
It calls a servlet class from index.html
But when I submit the details from index.html, it is unable to locate the class. I have tried various combinations in web.xml and weblogic.xml as the deployment descriptors. I am mentioning the code below. Any help would be appreciated.
Index.html
----------
<FORM ACTION="/greeting/GreetingServlet" METHOD="POST">
<P>Your Name <INPUT TYPE="text" SIZE="40" NAME="name"></P>
<P>Your Email <INPUT TYPE="text" SIZE="40" NAME="email">
<INPUT TYPE="submit" VALUE="Submit"></P>
web.xml
-------
<web-app>
<servlet>
<servlet-name>Registration</servlet-name>
<servlet-class>GreetingServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Registration</servlet-name>
<url-pattern>*</url-pattern>
</servlet-mapping>
</web-app>
weblogic.xml
------------
<context-root>
greeting
</context-root>
The directory structure is as:
------------------------------
..\temp\greeting
=> index.html
=> WEB-INF\
==> web.xml
==> weblogic.xml
==> classes\
===> GreetingServlet.class

TIA,
-sg


-sg
Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1859
Hi
the folder structure should be something like
../applications/greetings
why is it
temp/greetings
Saurabh Gour
Greenhorn

Joined: Sep 09, 2003
Posts: 3
Hi Rahul, sorry for being late in trying out your advice. But it really does not work. I am still stuck up at the same place. Also I guess, that it has more to do with the content of web.xml rather than the directory structure. My WL console shows GreetingServlet as one of the deployed servlet but still it fails to show up when called by index.html or even separately. Is it possible to call a simple class directly instead of going through index.html. Or is there a way to debug this small application ? I just want to get rid of this silly problem - though a first step in my learning of web application.
Best Regards,
Saurabh
Padam Krishna
Ranch Hand

Joined: Jul 24, 2003
Posts: 37
Have you looked at u'r managed server logs, access logs and admin server logs. May be you can find more details there.
As a round about way: if you have coded the service method rather then doPost in your servlet then invoke your servlet by typing the servlet url in the address bar with query parameters and see if it is getting inoked or not.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Probs in deploying a sample web app using WLS81