File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setting a servlet

 
Dan Drillich
Ranch Hand
Posts: 1183
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I�m trying to convince my first servlet to work ;-)
My weblogic 5.1 serves the following � http://ny1715:7001/mywebapp/index.html
index.html has the following form �
<form action="/mywebapp/servlet/GreetingServlet" method="post">
In the directory - mywebapp\WEB-INF\classes I have the class GreetingServlet.class
The mywebapp\WEB-INF\web.xml contains the following �
<servlet>
<servlet-name>Registration</servlet-name>
<servlet-class>GreetingServlet</servlet-class>
</servlet>
When submitting the form I get a 404 page.
Any ideas?
Thanks,
Dan
 
BJ Grau
Ranch Hand
Posts: 234
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have never used Weblogic, so this might not be much help - but are you sure you are using port 7001? Also, does Weblogic have some sort of default page that comes up when you go to http://localhost:<portnumber>? Try seeing if it works first.
 
Dan Drillich
Ranch Hand
Posts: 1183
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
http://ny1715:7001/mywebapp/index.html served the initial page.
The servlet wasn't reached.
Thanks,
Dan
 
Manohar Karamballi
Ranch Hand
Posts: 227
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai Drich!
In addition to what u have given in xml file u also need to give following info,,,
<servlet-mapping>
<servlet-name>
Servlet Name goes here
</servlet-name>
<url-pattern>
URI u want
</url-pattern>
</servlet-mapping>

and then in action of form change URL to /UR applcation/URI u want .
Also check whether web component for ur application is registered in config.xml file of ur server
 
mocca az
Ranch Hand
Posts: 93
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With Weblogic you also need to register servlet in weblogic.properties file. This doesn't just apply for servlets, any beans also need to ber registered.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17620
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
weblogic.properties is for WebLogic 5.1. The XML form took over in WLS 6.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic