Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
    Bookmark Topic Watch Topic
  • New Topic

Servlet, Application object serialization  RSS feed

 
Mathias Nilsson
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi!

I have a question about Object that are send over port 8080 from application to servlet in tomcat.

I have created object that implements the Serializable interface so that they can be sent as objects. I'm facing a problem. When I create the Classes to be serialized for the application I must create the exact samt Classes for the servlet to pass them from and to the application.

Isn't there a better way of doing this. Must the exact same classes resists in the tomcat web-inf/classes folder and in my application class path? Really annoing when I have to change a Class and must recompile both the class in servlet and class in application

// Mathias
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66143
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
That's what automated build tools such as Ant will help you keep up with.
 
Mathias Nilsson
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Report post to moderator
Ok thanks.... I just thought I have missed something.

So the best approach would be.

Create application project
Create Web project
Create a java class library and link the library to the application project and the web project?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66143
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
It's hard to say what the best approach would be without knowing a lot more about your project. A good source control tool will make such things easier as well -- you should have only one instance of the source no matter how many apps it ends up getting built into.

If you'd like to investigate this any further, let me know and I'll move this off to the Process forum.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66143
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
It appears that this is a cross-post of this topic.

Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.

This topic is closed.
[ March 08, 2007: Message edited by: Bear Bibeault ]
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!