Tag Info

Hot answers tagged

11

There are several options that can help you: This answer actually explains how to debug JSPs specifically: http://stackoverflow.com/questions/33739/jsp-debugging-in-intellij-idea. I haven't ever tried this so I followed the next three suggestions when I was using JSP, JBoss, and IntelliJ... Remember that JSPs are compiled to classes. When it says line ...


11

The best place I know of to host a Java Web application is on Google App Engine. It scales really well as it's free for low usage. Once you hit your quotas it's then pay as you go. Most Java Web hosting can cost anywhere from $25 per month and up, but Google App Engine is free to start. Our organization hosts many Web applications and Web sites on ...


7

I wouldn't suggest doing a rewrite a whole application. Especially one that is currently being used by the customer. You will never cut over to the new system until it can do everything that the old system does. While you are writing the new system, the customer and management are going to get impatient and want those new features. You, or someone else will ...


7

There are mostly two reasons to put scripts outside HTML code: Server-side, separation of concerns and clean code. You quickly understand why you must be very careful with that when you see some PHP code which, in the same piece of code, mixes PHP, SQL queries, JavaScript, HTML, CSS and Base64-encoded images embedded in CSS. Client-side, external scripts ...


4

You can certainly do all this in Java/JSP, but personally it sounds like overkill. I would recommend using the LAMP stack instead (Linux, Apache, MySQL, PHP). You should be able to get this working much quicker using PHP. If you are going to stick with Java/JSP, then I highly recommend making use of Spring MVC and JSTL tags to cut down on how much custom ...


4

One option would be to get a Linux virtual server and install the software of your choice on it (that might even let you stick with Oracle products if that's your preference). If that's a little too much setup and administration for you, you could look at using Bitnami's TomStack. (There are some Amazon EC2 Machine Images listed at the bottom - inlcuding ...


3

why do programmers weight JSP over servlets for that? You can look at JSP as just another more friendly syntax for writing servlets. So, it's not so much a choice between JSP and servlets: the choice is between writing servlets in JSP syntax and writing them in raw Java. As to why would someone prefer the first over the latter, for many (not all) ...


3

You might want to try the Head First series by Bert Bates and Kathy Sierra. They're particularly geared towards being brain friendly (e.g. Easy to digest).


3

I haven't used Struts for ages, but Struts by default can render Velocity markup, FreeMarker, as well as JSP (maybe other formats too). For example, to render FreeMarker pages, your action definitions would look like this: <action name="test" class="com.acme.TestAction"> <result name="success" ...


2

JSP is an alternative to PHP like any other programming language, and just like PHP is an alternative to anything other. CPU-wise, it will depend on your applications. JSP, as ASP.NET, are compiled and run in a virtual machine; PHP, on the other hand, is interpreted. In both cases, the bottleneck would probably be the database access or your application ...


2

Typically we imply knowledge of EL or relevant tag libraries when we list "JSP" as a required/recommended skill. Conversely, just because we list "JSP" doesn't mean we're looking for scriptlet coding, either. Besides, EL isn't really a difficult thing to understand if you've had any experience with JSP, ASP, PHP, etc.


2

I'd say that EL is way to "unimportant" a technique for being included in a job offer. You don't include typing skills either, do you? You don't include "knowledge of java.util.ArrayList" and so on.


2

One of your uses of taglibs is to encapsulate JavaScript. Is it possible to do this with just a JavaScript file? (or a JavaScript file and a div so the JavaScript file can write out any HTML it needs. or a JavaScript file and a few regular HTML fields.) JavaScript is very powerful. It has objects which let you avoid polluting the global namespace. And ...


2

You can use DWR for calling JavaScript functions from Java and vice-versa. If you want to use the standard Java technology for the web, i.e. JSF, then JSP is kind of deprecated; you should use Facelets (xhtml files).


2

For what you are describing, you might consider looking into node.js on the server rather than java. Node is very good for apps that need to 'link up' multiple connected clients so that you can relay info between them. Especially if you'll be tossing around JSON. I'm sure you could do it in java... its certainly your call. I just personally think node ...


2

In General, it would be harder to code complex Java code and put it inside a JSP, next is, It would be a really really messy code if you are going to combine complex java code inside a JSP. Just my two cents.


2

How much business logic is hiding in this application? Do you have the full specs at the start? All the requirements changes over the past decade? All the bugs that have been fixed? All the bugs that are still open? Comprehensive regression testing suite? To which was answered... How bad does the design have to be to justify a rewrite? This ...


2

I can think of several places where I would do this 1) Simple testing of an idea, I want to see how something works and don't intend to keep the code. 2) Data initialization, where the actual program logic is in an external file but I want to load initial data for some reason and don't want to have an ajax call to get it. For example if I have a list of ...


2

There is a good example about the MVC pattern applied to JSP and Servlet world in the HeadFirst Servlets and JSP book. Basically, the Controller part is represented by a Servlet. The JSP is the view and the Model functions are performed by some Plain Old Java Object, i.e. a regular Java Class. In the book they show how you can write a simple BeerExpert app ...


2

The main advantage of JSP is that it's are easier to code and to read when you are creating a dynamic HTML front-end. That's because you write mainly HTML and in some places embed Java code. In a servlet you would have to invert the logic, ie, write java code and print HTML. That's because in the presentation layer most code is HTML/JS. On the other ...


1

Having a jsp as a controller is wrong for multiple reasons. Development mode should not dictate application architecture or in other words if you need hot deploy choose a proper tool/server for that. Adding an intermediate controller (jsp) create many data handling problems than it solves. For instance how do you handle passing request parameters? How do you ...


1

Error Handling and Displaying to users can be unique depending on your UI design and on how you want to view it by the user. Displaying it on mobile can be different from displaying on a desktop. What I know is it is important as well to categorize these errors. There are validation errors, security access errors, critical error(i.e database exceptions, any ...


1

Has anyone done this successfully? Here is the success story of our company. For a pretty long time we had a messy website: PHP/MySQL, mostly Drupal 6. Many custom Drupal modules of medium quality. Some really old legacy code parts written in plain PHP+SQL+HTML+JS+CSS (there were files actually containing all of those at once). Those were actually ...


1

JSPs are preferred if you are mainly augmenting an HTML template with server-generated data (e.g., generating a table of information or filtering a collection of images/documents). Servlets are preferred for functions that don't have UI-related work (e.g., filters and web services). JSPs seem to becoming a little less common nowadays, with more work being ...


1

Just because a JSP is compiled into a servlet doesn't mean there is no difference between these two. Actually, there might be someone out there who wrote a JSP interpreter that doesn't translate a JSP into a servlet but performs any other kind of execution. Think about the concept of servlets and JSP and compare these concepts against each other - not the ...


1

I think these or any other set of web technologies could do the job. Comes down to what you are going to do with what you know best (-; If you want to stick with Java, check out Core Servlets for a JSP tutorial -- helped me when I was starting out with all things java-web-app. Sounds like a fun project. Good luck!


1

Yes. Go to: MyEclipse->Preferences->MyEclipse->Files , and Editors->JavaScript->Editor->Templates. There you can see the existing templates that work in a similar manner to the Java templates. If the context is JavaScript then they'll be available when editing JavaScript. To get the code to automatically be inserted when you enter the template name then ...


1

Technically, you can create a very substantial set of custom tag libraries that cover everything you want to do that would need to deal with classes and other Java artifacts without those libraries. In practice, however, such comprehensive taglibs are rarely created and maintained. Thankfully, only a basic understanding of Java is needed to do most things ...


1

I would try to shape the application developing a DSL (domain specific language). That would leverage the protocol logic, decupling from the actual input, and via reflection should allows execution (instance of POJO) of the required duties. The protocol grammar could be developed and tested stand alone and incrementally, with the help of a parser generator. ...



Only top voted, non community-wiki answers of a minimum length are eligible