• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
prateek sharmaa
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • 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?
 
Devaka Cooray
ExamLab Creator
Marshal
Pie
Posts: 4500
267
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • 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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64961
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic