• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

pointing to second project's class file in first project's web.xml

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
This question may sound stupid but I am stuck at it.

I have two projects in my workspace.
(1) core
(2) web

I have created a servlet in core project with name ShowDashboardServlet.java
In my web project I want to configure web.xml to point to TestServlet.java

Below mapping is done in web project's web.xml.



I want to do this because we want the URL to look like /web/dashboard/myproject and not /core/dashboard/myproject
and I can not put the servlet in web project as there are no servlet related jars available and few more jars that I use in the servlet are missing in web project.

so my restriction is that i need to keep the servlet in core folder and need to configure it in web project.

can I do this?
 
Sheriff
Posts: 7136
1360
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

prateek sharmaa wrote:
so my restriction is that i need to keep the servlet in core folder and need to configure it in web project. can I do this?



No, unless you bundle all required dependencies of the core project in to a jar file and use it in the web project. I don't see what you are trying to accomplish with this sort of architecture. If you can elaborate your real need, we can be more helpful.
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It just sounds like a bad design all around. You should take a few steps back and reevaluate this approach.
 
reply
    Bookmark Topic Watch Topic
  • New Topic