0

I recently developed a whole system in Java that connected to a database and exports and imports the table content to an excel sheet. I used SWING for the user interface. the user will interact with it for authentication and file management.

Apparently the client changed the requirements, He wants everything from a Web Interface. My team leader advised to look through JSP.

  1. What does JSP actually do?
  2. Will I have to rewrite the User Interface in Web if I used JSP?
  3. is there an more effective and efficient solution to do this job?

I would Appreciate a specific answer

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
user1912404
  • 386
  • 4
  • 11
  • 26

5 Answers5

2

I'm not sure what you mean by "specific answer", but here goes:

  1. JSP is a kind of template language, based on Java, and a technology for dynamically generating HTML. It's a server side technology. Look here.

  2. Yes, if you're going for a pure web/HTML solution, you'll need to completely rewrite the UI.

  3. There are other frameworks for creating webapps, such as Vaadin or Play! Framework that may be "better" than JSP, but then there's a whole new API/framework to learn...

claesv
  • 2,075
  • 13
  • 28
2
  1. What does JSP actually do?
  2. Will I have to rewrite the User Interface in Web if I used JSP?
  3. is there an more effective and efficient solution to do this job?

and

I used SWING for the user interface.

and

exports and imports the table content to an excel sheet.

not, have to look at JavaFX 2

mKorbel
  • 109,525
  • 20
  • 134
  • 319
  • what about Java Web Start ? – user1912404 Jan 03 '13 at 08:03
  • depends of, you can to create an hybrid application, mixing JApplet and to stays with current container based on JFrame, then JWS could be a proper way – mKorbel Jan 03 '13 at 08:08
  • No need for a [hybrid](http://stackoverflow.com/a/12449949/230513); just deploy existing application using [tag:javawebstart] in the interim. – trashgod Jan 03 '13 at 10:10
  • I followed [this](http://www.mkyong.com/java/java-web-start-jnlp-tutorial-unofficial-guide/comment-page-1/#comment-126082) – user1912404 Jan 03 '13 at 12:24
  • and am getting this com.sun.deploy.net.JARSigningException: Found unsigned entry in resource: http://localhost:8080/Talisman.jar – user1912404 Jan 03 '13 at 12:25
  • @trashgod what do you this the problem is? – user1912404 Jan 03 '13 at 12:26
  • @user1912404 [JApplet must be singed](http://docs.oracle.com/javase/tutorial/deployment/applet/security.html), [for more details see info & question tagged by JWS](http://stackoverflow.com/tags/java-web-start/info), there is everything, I hope :-) – mKorbel Jan 03 '13 at 12:33
  • @mKorbel i removed the security node in the luch file. so the exception got solved but i have another one now: – user1912404 Jan 03 '13 at 13:18
  • java.lang.NoClassDefFoundError: org/apache/poi/ss/usermodel/CellStyle at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2442) at java.lang.Class.getMethod0(Class.java:2685) – user1912404 Jan 03 '13 at 13:19
  • 1
    this should be topic for a new question, don't forget for [SSCCE](http://sscce.org/) generated a.m. exceptions, short, runnable, compilable, otherwise everything are shorts to the dark – mKorbel Jan 03 '13 at 13:40
0

You will certainly need to rewrite the user interface if you convert to JSPs.

JSPs are essentially just a method for dynamically generating HTML (with the option to embed Java code to produce parts of the page).

It is still possible to run Swing applications from a web browser: you might want to take a look at Java Web Start. This will save you from having to do a complete rewrite.

mikera
  • 105,238
  • 25
  • 256
  • 415
0

1.) JSP is pretty much like PHP. It is server side scripting. When ever a browser request for a page (JSP page), server (mostly Tomcat or any application server which you deploy your JSP project) will generate HTML content using the JSP code. Mainly JSP consist of part HTML, JavaScipt (if you want dynamic stuff), and Java.

2.) As far as I know if you are aked to do it in JSP then you need to o all the client side work again in JSP. There you will be generating HTML UIs using Java codes. But you can use all the back end codes you used.

dinesh707
  • 12,106
  • 22
  • 84
  • 134
0

You may can use SWING in a Applet.

Grim
  • 1,938
  • 10
  • 56
  • 123