Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

New to J2EE: Is browser only option as the front end tool in J2EE

 
Ajai Augustine
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to J2EE and I have some questions about J2EE Actually I couldnt find an answer anywhere.
1.is jsp/servlet can only be used when we are using internet and browsers to display the front end?
2.Is this jsp/servlet only for developing web applications like e-commerce web sites? Can it be used to develop other applications like software for companies, that do their regular job like inventory management or pay roll management?

Any help?
Thanks
Ajai
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No to both.

You can create Servlets and JSPs to work on any protocol though in practice HTTP is used almost exclusively.

The tech is used a lot in corporate websites and intranet applications, often invisible to the naked eye,
 
Mark Vedder
Ranch Hand
Posts: 624
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

1.is jsp/servlet can only be used when we are using internet and browsers to display the front end?

If using a browser as a front end, then jsp/servlet would likely be your choice for a front end display. But you could also right an applet (using Swing for a GUI) that runs in a browser. That applet can then communicate back to the server. If you did not use a browser, you could use a client installed application or a Java Web Start application, either as a standalone application or to connect back to a server if your application required such.


2.Is this jsp/servlet only for developing web applications like e-commerce web sites? Can it be used to develop other applications like software for companies, that do their regular job like inventory management or pay roll management?

jsp/servlet, and J2EE, can be used to create anything. E-commerce is a common use, but inventory, payroll management, time tracking, basic websites, advanced websites, remote mainframe connectivity, and a lot of other things can (and have) been done.
 
Ajai Augustine
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot for your quick reply.

If I use Swing to create a front end(no browsers invloved, Just a JFrame), and send the data to server using HTTP(I dont know how), whether a servlet or jsp program at the server be able to handle that data, in the same way, it handles data from html form, send using internet. I mean whether I will be able to use implicit objects and more like request.getParameter().

[ March 06, 2005: Message edited by: Ajai Augustine ]
[ March 06, 2005: Message edited by: Ajai Augustine ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65218
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you were going to write a Swing front end I would wonder why you want to impose the limitations of the HTTP protocol on your program.
 
Ajai Augustine
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you were going to write a Swing front end I would wonder why you want to impose the limitations of the HTTP protocol on your program.


I just want to know, whether I will be able to use, jsp/servlet in an environment like that. Or is that a good idea?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ajai,
If you choose to use Swing, you would make remote EJB calls to the server. The Swing front end would replace the JSP/servlet front end. You wouldn't use both.
 
James Carman
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
If you were going to write a Swing front end I would wonder why you want to impose the limitations of the HTTP protocol on your program.


Maybe he has a firewall to deal with. HTTP makes that quite a bit easier. You can use JAX-RPC to talk to objects on your server using SOAP. A servlet would "front" your implementation objects, translating a SOAP request into a method call.
 
Ajai Augustine
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
May be I am not explaining clearly.
I am just new to servlet/jsp and all those related things. I have learned those and used in small web sites.
then now I want to know whether I can use, these jsp/servlet in an environment like this.
A small company, with an intranet. Have a server and different clients, which employees can use to do day to day works.
I know I can develop applications just by using java, and clients using swing and connect client and server using RMI.
I just want to know, in this environment is this jsp/servlet is of any use. or just following the way I explained above is the only or best option.

May be I am not understanding things right
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A servlet that takes XML in and produces XML out can be a server to any kind of client. Talking "XML over HTTP" is a common way to build "web services". I think of it as a useful "lowest common denominator" that can be called by clients in nearly any language and OS or platform. So, yes, you could build a Swing client using HTTP to call servlets.

SOAP is a standard for formatting the XML. You can get some cool SOAP tools like Apache Axis or BEA's Glue that make remote SOAP calls nearly as simple as any object method call. They can even make the XML invisible - you never have to touch it. Glue once ranked very well on interoperability with different clients, eg Microsoft dot net and other languages and tools. I don't if that's important to you or how they're holding up lately.

If it's ok to say your server will support Java clients only you could look at RMI (considered seriously broken by some) or even EJB remote calls. I used a vendor framework with proprietary remote protocols, not something I'd recommend writing unless you have LOTS of time on your hands.

Any of that sound useful to you?
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe you, should learn grammar, for english is good idea?

Seriously, your grammar is so poor that it's almost impossible to comprehend what your actual question is.
 
James Carman
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeroen Wenting:
Maybe you, should learn grammar, for english is good idea?

Seriously, your grammar is so poor that it's almost impossible to comprehend what your actual question is.


Wow! That was harsh! True, but harsh.
 
Ajai Augustine
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I will definitely work on my grammar.

But I think I got the answer for my question.

If you choose to use Swing, you would make remote EJB calls to the server. The Swing front end would replace the JSP/servlet front end. You wouldn't use both.



I thought jsp/servlet is to process the data from any gui. Because when I used the JSP, I used HTML form to create the gui and JSP to process the data. But the truth is it is to create gui, right?
And when we use jsp/servlet as the front end then we have to use browser to display the gui.

Thanks again
Ajai
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ajai,
Right! It is best to keep logic/data processing out of the JSP. It's ok to put it in the servlet though. The JSP should be pure presentation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic