| Author |
To change JDeveloper target url
|
gov kur
Ranch Hand
Joined: Aug 30, 2004
Posts: 73
|
|
Hello everybody.. I have written a sample web-application "test" on JDeveloper contaning 2 servlets(Servlet1 ,Servlet2). They are contained in a package "com.gov.servlets". Now even though i mention my url as "/servlet/Servlet1" and "/servlet/Servlet2" , the TARGET URL that JDeveloper checks is http://192.145.3.23:8989/test/servlet/com.gov.servlets.Servlet1 what should i do so that "com.gov.servlets" does not appear in the URL ? I have already tried everything in Project Properties but i could not find anything that made a difference . Please help ...
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26192
|
|
Add a servlet mapping to the web.xml. For example: Also, check you aren't forwarding anywhere after the servlet executes. I'm moving this to our servlet forum as it isn't JDeveloper specific.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
gov kur
Ranch Hand
Joined: Aug 30, 2004
Posts: 73
|
|
I have provided the servlet mapping in web.xml as ----------------------------------------------------------- <servlet> <servlet-name>Servlet1</servlet-name> <servlet-class>com.gov.servlets.Servlet1</servlet-class> </servlet> <servlet-mapping> <servlet-name>Servlet1</servlet-name> <url-pattern>/servlet/Servlet1</url-pattern> </servlet-mapping> ----------------------------------------------------------------- also i have ensured that Servlet1 is my Default Run Target.. inspite of this the Target URL generated by the Embedded OC4J Server is "http://192.145.3.23:8989/test/servlet/com.gov.servlets.Servlet1" and not "http://192.145.3.23:8989/test/servlet/Servlet1". Please Help...
|
 |
gov kur
Ranch Hand
Joined: Aug 30, 2004
Posts: 73
|
|
Hello People... just got the answer...it seems that the WEB.xml that is generated automatically by the JDeveloper( with all the servlet mapping and all) was being placed in public_html while another harmless WEB.xml was present in WEB-INF that basically has none of the mappings in it.. inspite of this JDeveloper was able to read my application folder structure and as a result was generating the url with the entire Package path in it. Just glad thats done with...and i guess shows that one needs to get the basics right first .... CHEERS
|
 |
 |
|
|
subject: To change JDeveloper target url
|
|
|